Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Blade Syntax for PHPNew to Visual Studio Code? Get it now.
Blade Syntax for PHP

Blade Syntax for PHP

Trung Dang

|
34,228 installs
| (3) | Free
Blade syntax highlighting for (in) PHP
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Blade Syntax for PHP

Unfortunately, Tabnine is recommended for now instead of the amazing Intelephense, as Intelephense doesn't support auto-complete for Blade blocks ({{ }}) yet

Blade syntax highlight support for (in) PHP.

Use with Language Mode: PHP, so others PHP exts should work (Intelephense,...etc)

Additionally, switch to Language Mode: Blade to highlight only Blade (and PHP inside of Blade) syntaxes

Screenshot

TBA

User Settings

TBA

Todo:

  • Add keyboard shortcut to switch between PHP and Blade Language Mode
  • When #53885 #68647 is solved, we can:
    • Enable/Disable the syntax in real-time, as well as a shortcut for it.
  • Your ideas? (submit an github issue)

Features

  • Blade syntax highlight
  • Blade directives (@if, @foreach, @section, ...) with PHP highlighting inside
  • Blade components (<x-component>, <x-slot:name>, self-closing & namespaced) highlighted distinctly from plain HTML elements
  • More incoming <3

Blade Syntax Highlight

  • Injected to PHP Language Mode!, just open any extension of PHP file
  • Switch language mode to Blade (Ctrl + K, M or ⌘ K, M)
    • Will leaves only Blade and it's sub-PHP codes to be highlighted, useful to debug/nav around large @blade methods

Contact

Files any issue(s).

Credits

  • Blade language grammar is forked & picked from onecentlin
    • Checkout her Blade&Laravel Snippets
  • Additional credits:
    • https://github.com/jawee/language-blade
    • https://github.com/Medalink/laravel-blade

Development

  • npm run validate — JSON + grammar compile check.
  • npm test — grammar tokenization regression tests.
  • Publishing a new version is documented in RELEASING.md.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft