Laravel Blade Template syntax definitions for Sublime Text based on its HTML/CSS/JS syntaxes.
The easiest way to install is using Package Control. It's listed as Laravel Blade
.
- Open
Command Palette
using ctrl+shift+P or menu itemTools → Command Palette...
- Choose
Package Control: Install Package
- Find
Laravel Blade
and hit Enter - Restart Sublime Text (e.g.: if A File Icons is installed)
- Reopen any
.blade
files.
- Download or clone this repository into
[install-dir]/Packages/Laravel Blade
- Restart Sublime Text (e.g.: if A File Icons is installed)
- Reopen any
.blade
files.
Note
Syntax from main
branch require Sublime Text 4.
For Sublime Text 3 compatible version refer to st3
branch.
-
To use AlpineJS with Blade templates,
- install AlpineJS package
- follow instructions to create combined HTML (Blade, AlpineJS) syntax
For Blade related snippets, please install Blade Snippets package.
Blade extends Sublime Text's HTML syntax definition.
If Blade syntax highlighting doesn't work and console displays syntax errors in HTML (Blade).sublime-syntax, please make sure to remove any out-dated syntax override.
Steps:
- call Menu > Preferences > Browse Packages..
- Look for HTML folder
- Remove it or at least delete any syntax definition in it.
Blade relies on JavaScript (source.js
)
to scope script blocks and inline scripts.
Make sure to remove related out-dated syntax packages, which don't meet least compatibility requirements.
They can be identified by calling
e.g. sublime.find_syntax_by_scope("source.js")
in ST's console.
Known candidates are:
It is a fork of great Medialink/Laravel Blade Highlighter.