• Sign In



  • Categories

    Extension Details



    Readme

    alt text Laravel Suite

    Important Prerequisites

    ⚠️ Needless to say, if you have the
    Blade Extension
    installed, you need to uninstall or disable. Otherwise this extension
    won't work as expected

    Sponsorship ❤️

    If this project &
    tree-sitter-blade put a
    delightful smile on your face, don't forget to star ⭐ both projects or
    maybe sponsor... 👀

    Buy Me A Coffee

    Introduction

    This extension provides Laravel blade file parsing based on a
    tree-sitter-blade🌳
    tree-sitter-blade which was
    created with this extension in mind.

    Hoping for this extension to be an all in one for Laravel projects in
    Nova, now that the tree-sitter-blade project has reached a very stable stages
    0.12.0+

    Features

    1. Integration with tree-sitter-blade

    • It is up to date as of 12.x

    2. Syntax highlighting and autocompletion support for all blade directives

    3. php injection support

    • Unlike traditional textmate based parsers, you will now get php injections
      at all the right spots required. (no more string highlighting as parameter
      or in blade attributes!) 🤘

    php injection

    4. Context aware autocompletion

    • You get the correct autocompletion, exactly based on the location of your
      cursor in the document
    • For example you do not get blade attribute autocompletion, if the cursor is
      not located in the attribute syntax tree

    completion

    5. Support for indentation increase/decrease after pressing return key

    6. Folding Support

    folding

    7. Shell injection / Laravel Envoy

    • You now get completion for Laravel envoy directives
    • On top of that, the content of the tasks are correctly parsed as shell! 🤯

    php injection

    8. Commenting

    • Since the v2.0.0 thanks to tree-sitter-blade v0.12.0 you can now use your
      global commenting shortcut to comment out in blade comments, and not in html
      syntax!

    9. Javascript injection for AlpineJS and Livewire

    • From v2.0.0 you will now get syntax highlighting and javascript injection
      for AlpineJS and Livewire attributes!

    Staying up-to-date?

    Just star ⭐ or watch 👀
    Laravel Suite and
    tree-sitter-blade

    Issues:

    Tree-Sitter-Blade 🌳

    If you see any problem with parsing, very likely it is related to the
    tree-sitter-blade. So please
    raise an issue on that repo

    Laravel Suite alt text

    Anything else please raise an issue on
    Laravel Suite repo

    Disclaimer

    This project is not approved, sponsored, or affiliated with Laravel, Laravel or
    its related projects

    Release Notes

    v2.2.3

    • fixed #36

    v2.2.2

    • parse and highlighting no longer breaks, when blade directives are mixed with
      normal attributes

    v2.2.1

    v2.2.0

    • Fixed bug relating to multi-cursor placement when providing nested directive
      completions
    • @session, @wireUiScript, @context, @script, @assets
    • Bumped tree-sitter-blade to fix nested conditionals inside loops syntax
      highlighting
    • Added highlighting support for <?php ?>

    v2.1.3

    • Updated the min_runtime Nova Version to 13.2

    v2.1.2

    • Updated the README regarding syntax highlighting bug fix

    v2.1.1 🚀

    Bug Fix 🐞:

    • HTML Theme selector improvement in highlights.scm

    v2.1.0 🚀

    Bug Fix 🐞:

    • Support for ARM architecture

    v2.0.0 🚀

    This major release takes care of many of the bugs and shorcomings due to the way
    the blade files were parsed!

    New Stuff ✨:

    • Bumped the tree-sitter-blade to the very latest, which was written from ground
      up to fix the shortcommings!
    • The parser is now 5x faster
    • The comments now work as expected with your code editor global shortcut.
      NO for workarounds
    • The Javascript is now injected in the appropiate attribute thanks to the
      tree-sitter-blade
    • AlpineJS
    • Livewire
    • The nested components are now correctly highlighted such as <x-foo.bar ...
    • Better and more accurate syntax highlighting, in fact better than the internal
      HTML!
    • Livewire Completions
    • Improved syntax aware completion, based on where the code is located now!
    • Better and improved semantic tree structure, allowing you to find bugs in your
      code faster.
    • Support for @svg
    • Fixed a bug relating to some parameter structures.
    • Indentation should work as expected now!
    • The parser is now using the ABI 15

    v1.9.0

    New Stuff ✨:

    • Bumped tree-sitter-blade to v0.11.0
    • Support for Inertia @inertia and @inertiahead
    • Support for Ziggy @routes

    v1.8.0

    New Stuff ✨:

    • Bumped tree-sitter-blade to v0.10.0
    • Support for the brand new Laravel @use directive
    • Support for @js

    v1.7.0

    New Stuff ✨:

    • Bumps tree-sitter-blade to v0.9.2
    • Shell injection for laravel Envoy

    php injection

    • New directives
    • Envoy
    • @servers
    • @import
    • @task
    • @story
    • @setup
    • Hooks
    • @before
    • @after
    • @error
    • @success
    • @finished
    • Notifications
    • @before
    • @slack
    • @discord
    • @telegram
    • @microsoftTeams

    Bug Fix 🐞:

    • parsing bug #20

    v1.6.1

    Bug Fix 🐞:

    • Emmet extension should now work as expected with Blade files! #19 🙈

    v1.6.0

    New Stuff ✨:

    1. Typing {

    comment

    2. typing "comment"

    comment

    3. using CMD+\ shortcut

    comment

    v1.5.0

    New Stuff ✨:

    • Bumps tree-sitter-blade to
      v0.7.0
    • Full support
      Template Inheritance
    • @aware
    • @parent
    • inline @section
    • nested @section with @endsection or @show end directive

    v1.4.0

    New Stuff ✨:

    • Bumps tree-sitter-blade to v0.6.0
    • Added support for bracket selectors, allowing the themes to take advantage
      of. #14
    • Support for Laravel Pennant
    • @feature
    • @elsefeature

    Bug Fix 🐞:

    • Fixed bug #15

    v1.2.0

    New Features ✨:

    • bumped tree-sitter-blade🌳 to v0.4.1
    • Support for Authorisation Directives:
    • @can
    • @canany
    • @cannot
    • @elsecan
    • @elsecannot
    • @elsecanany

    v.1.1.1

    Bug Fixes: 🐞

    • Fixes attribute html injection problems. See #11

    v1.1.0

    New Features ✨:

    1. Completion now covers all the directives supported in

    tree-sitter-blade and they are as it follows:

    • loops
    • @for
    • @foreach
    • @forelse
    • @while
    • Livewire 🪼
    • @persist
    • @teleport
    • @volt

    2. Syntax Highlighting adjustment

    • The attribute directives now match the theme colouring for
      tag.attribute.name
    • For other directives theme selector has been changed to tag.framework so
      that it is semantically correct

    Bug Fixes: 🐞

    • Fixed the issue @verbatim adding parameter in completion
    • Remove duplicate @break until the issue is fixed in #10

    📣 1.0.0 🎉

    Finally support for php injection 🥳 as well php autocompletion that is provided by Nova! see below for more info 👇
    • This includes
    • inside parameters, {{ }} @php @endphp or anywhere else you expect
      syntax highlighting!
    • The php injection would have NOT been possible without the work done
      @CalebDW on the core tree-sitter-php🙏 see
      tree-sitter-php split_parser pull request draft
    • To get this work, I cloned the split_parser draft, then php-only
      subsyntax was created in Nova
    • Then all the first party completions, queries were copied, and adjusted
      to support the new php-only sub-syntax
    • This is a temporary measure until the pull request is merged, and then
      adopted by Nova, which might take a long time.

    php injection

    Other Updates
    • Updated the submodules to the latest version
    • Completion file names all adjusted to avoid confusion, prefixed with php or
      blade
    • Added adjusted makeFile to tree-sitter-php-only to allow generation of
      correct dynamic library for Nova

    0.2.2

    • Extension typo fix...

    0.2.0

    New Features:

    bumped the tree-sitter to v0.3.2, which includes:
    • a lot of bug fixes,
    • Folding Support
    • Directive support for Livewire including the upcoming v3.0
      folding
    Using Symbolic icons so that completion can be distinguished easier and semantic.
    • @vite support
    • Completions refactored and categorised to follow their order they appear in
      tree-sitter grammar as well as following the rule_names
    • Autocompletions:
    • attributes
      • @class
      • @style
      • @checked
      • @selected
      • @disabled
      • @readonly
      • @required
    • keywords
      • @csrf
      • @viteReactRefresh
      • @livewireStyles
      • @livewireScripts
      • @livewireScriptConfig
    • inline directives
      • @extend
      • @yield
      • @include
      • @includeIf
      • @includeWhen
      • @includeUnless
      • @includeFirst
      • @props
      • @method
      • @inject
      • @each
      • @vite
      • @livewire
    • @Switch
      • @case
      • @break
      • @default
    • conditionals and if statements
      • @section
      • @fragment
      • @once
      • @verbatim
      • @push
      • @pushOnce
      • @pushIf
      • @prepend
      • @prependOnce
      • @if
      • @Unless
      • @isset
      • @auth
      • @guest
      • @production
      • @env
      • @hasSection
      • @sectionMissing
      • @error
    • @php tags
    Adjustment to auto indentation increase/decrease

    Bug Fix 🐞:

    • Issues with context aware completion see #7 resulting with problem completing
      the attribute directives as well as none relating completion showing in
      attributes

    0.1.0

    • Support for code folding for blade directives
    • bumped the tree-sitter-blade to 0.1.2

    Version 0.0.6

    • Extension rearrangements for slimming purposes.
    • Streamlining the build process & including the code signing

    Version 0.0.5

    • Initial Release
    • Integration with tree-sitter-blade
    • Support for automatic indentation increase and decrease
    • Very basic context aware autocompletion (not complete at all)