EmranMR / tree-sitter-blade

tree-sitter grammar for Laravel blade files
MIT License
199 stars 8 forks source link

Blade comment got override with html parser #78

Open ahmadmuqri0 opened 2 weeks ago

ahmadmuqri0 commented 2 weeks ago

I did follow every guide to setup injections and highlights in the discussion here #19. But when i try to do comment with shortcut in neovim, it did the html one and not blade. Screenshot from 2024-10-26 11-50-54

while i do try to do some work around by declaring the commentstring to {{-- %s --}}, it is still does not work.

EmranMR commented 2 weeks ago

Yea, currently all tree-sitter code editors have this problem with this grammar, whereby inject html comment, since the editor is in HTML context at the time of pressing the shortcut. I manage to work around this by adding a few snippets in Nova#18.

ahmadmuqri0 commented 2 weeks ago

Well that's a shame, maybe i will try to write some snippets too for this work around.