nvim-treesitter/tests/query/injections/query/test-query-injections.scm
Riley Bruins 7cec6219c4 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.
2024-07-27 17:17:26 +02:00

27 lines
620 B
Scheme

; 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))