fix(query): properly apply predicate injections

I think these have been broken since the query parser update. Basically
the inner node for the string content was preventing injections because
include-children was not set.
This commit is contained in:
Riley Bruins 2024-07-27 07:54:27 -07:00 committed by Christian Clason
parent 2b4881286a
commit 7cec6219c4
2 changed files with 36 additions and 9 deletions

View file

@ -0,0 +1,27 @@
; vim: ft=query
; format-ignore
(((symbol) @constant
(#not-lua-match? @constant "^_*[A-Z][A-Z0-9_]*$"))
; ^ @luap
)
; format-ignore
(((tag
(attributes
(attribute
(attribute_name) @keyword)))
(#match? @keyword "^(:|v-bind|v-|\\@)"))
; ^ @regex
)
((comment) @injection.language
.
[
(string_expression
(string_fragment) @injection.content)
(indented_string_expression
(string_fragment) @injection.content)
]
(#gsub! @injection.language "#%s*([%w%p]+)%s*" "%1")
; ^ @luap
(#set! injection.combined))