mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(query): differentiate lua-match strings by using luap injections and fix offset matches
This commit is contained in:
parent
25f99a270a
commit
4beba61dde
1 changed files with 8 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue