EmranMR / tree-sitter-blade

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

PHP highlight not work, but installed #73

Open brunojoao opened 1 hour ago

brunojoao commented 1 hour ago

image

TSInstall php blade

highlights.scm (directive) @function (directive_start) @function (directive_end) @function (comment) @comment ((parameter) @include (#set! "priority" 110)) ((php_only) @include (#set! "priority" 110)) ((bracket_start) @function (#set! "priority" 120)) ((bracket_end) @function (#set! "priority" 120)) (keyword) @function

injections.scm ((text) @injection.content (#not-has-ancestor? @injection.content "envoy") (#set! injection.combined) (#set! injection.language php))

; could be bash or zsh ; or whatever tree-sitter grammar you have. ((text) @injection.content (#has-ancestor? @injection.content "envoy") (#set! injection.combined) (#set! injection.language bash))

css, javacript works, but php not

inspectTree: image

calebdw commented 1 hour ago

You probably haven't installed the php_only parser

brunojoao commented 1 hour ago

image

i try, but not works

brunojoao commented 1 hour ago

now works, missing step 3, thx

((php_only) @injection.content (#set! injection.language php_only))