nvim-treesitter/queries/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

28 lines
773 B
Scheme

((predicate
name: (identifier) @_name
parameters: (parameters
(string
(string_content) @injection.content)))
(#any-of? @_name "match" "not-match" "any-match" "vim-match" "not-vim-match" "any-vim-match")
(#set! injection.language "regex"))
((predicate
name: (identifier) @_name
parameters: (parameters
(string
(string_content) @injection.content)))
(#any-of? @_name "lua-match" "not-lua-match" "any-lua-match")
(#set! injection.language "luap"))
((predicate
name: (identifier) @_name
parameters: (parameters
(string
(string_content) @injection.content)
.
(string) .))
(#any-of? @_name "gsub" "not-gsub")
(#set! injection.language "luap"))
((comment) @injection.content
(#set! injection.language "comment"))