mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 11:20:07 -04:00
Improve set queries
This commit is contained in:
parent
0a8842a454
commit
2dcfefa9da
1 changed files with 34 additions and 9 deletions
|
|
@ -51,17 +51,42 @@
|
||||||
)
|
)
|
||||||
|
|
||||||
(normal_command
|
(normal_command
|
||||||
(identifier) @function.builtin
|
(identifier) @function.builtin
|
||||||
. (argument) @variable
|
. (argument) @variable
|
||||||
(#match? @function.builtin "\\c^(set)$"))
|
(#match? @function.builtin "\\c^(set)$")
|
||||||
|
)
|
||||||
|
|
||||||
(normal_command
|
(normal_command
|
||||||
(identifier) @function.builtin
|
(identifier) @function.builtin
|
||||||
. (argument)
|
(#match? @function.builtin "\\c^(set)$")
|
||||||
. (argument)
|
(
|
||||||
(argument) @constant
|
(argument) @constant
|
||||||
(#any-of? @constant "PARENT_SCOPE" "CACHE" "FORCE")
|
(#any-of? @constant "PARENT_SCOPE")
|
||||||
(#match? @function.builtin "\\c^(set)$")
|
) .
|
||||||
|
)
|
||||||
|
|
||||||
|
(normal_command
|
||||||
|
(identifier) @function.builtin
|
||||||
|
(#match? @function.builtin "\\c^(set)$")
|
||||||
|
. (argument)
|
||||||
|
(
|
||||||
|
(argument) @m_cache @constant
|
||||||
|
.
|
||||||
|
(argument) @m_type @constant
|
||||||
|
(#any-of? @m_cache "CACHE")
|
||||||
|
(#any-of? @m_type "BOOL" "FILEPATH" "PATH" "STRING" "INTERNAL")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(normal_command
|
||||||
|
(identifier) @function.builtin
|
||||||
|
(#match? @function.builtin "\\c^(set)$")
|
||||||
|
. (argument)
|
||||||
|
(argument) @m_cache
|
||||||
|
(#any-of? @m_cache "CACHE")
|
||||||
|
(
|
||||||
|
(argument) @m_force @constant
|
||||||
|
(#any-of? @m_force "FORCE")
|
||||||
|
) .
|
||||||
)
|
)
|
||||||
|
|
||||||
((argument) @boolean
|
((argument) @boolean
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue