feat(query): differentiate lua-match strings by using luap injections and fix offset matches

This commit is contained in:
Amaan Qureshi 2023-03-03 05:36:23 -05:00
parent 25f99a270a
commit 4beba61dde

View file

@ -1,6 +1,13 @@
((predicate
name: (identifier) @_name
parameters: (parameters (string) @regex))
(#match? @_name "^#?(not-)?(match|vim-match|lua-match)$"))
(#match? @_name "^#?(not-)?(match|vim-match)$")
(#offset! @regex 0 1 0 -1))
((predicate
name: (identifier) @_name
parameters: (parameters (string) @luap))
(#match? @_name "^#?(not-)?lua-match$")
(#offset! @luap 0 1 0 -1))
(comment) @comment