mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-03 03:56:52 -04:00
move the catch uppercase query to the top to make it overridable, add back the more useful queries
This commit is contained in:
parent
28475d5676
commit
04b87c7b6e
1 changed files with 73 additions and 4 deletions
|
|
@ -1,3 +1,9 @@
|
|||
(normal_command
|
||||
(identifier)
|
||||
(argument (unquoted_argument)) @constant
|
||||
(#match? @constant "^[A-Z][A-Z_]+$")
|
||||
)
|
||||
|
||||
[
|
||||
(quoted_argument)
|
||||
(bracket_argument)
|
||||
|
|
@ -103,15 +109,78 @@
|
|||
)
|
||||
|
||||
(normal_command
|
||||
(identifier)
|
||||
(argument (unquoted_argument)) @constant
|
||||
(#match? @constant "^[A-Z][A-Z_]+$")
|
||||
(identifier) @_function
|
||||
. (argument) @variable
|
||||
(#match? @_function "\\c^set$")
|
||||
)
|
||||
|
||||
(normal_command
|
||||
(identifier) @_function
|
||||
. (argument) @variable
|
||||
(#match? @_function "\\c^set$")
|
||||
. (argument)
|
||||
(
|
||||
(argument) @_cache @storageclass
|
||||
.
|
||||
(argument) @_type @type
|
||||
(#any-of? @_cache "CACHE")
|
||||
(#any-of? @_type "BOOL" "FILEPATH" "PATH" "STRING" "INTERNAL")
|
||||
)
|
||||
)
|
||||
|
||||
(normal_command
|
||||
(identifier) @_function
|
||||
(#match? @_function "\\c^unset$")
|
||||
. (argument)
|
||||
(argument) @storageclass
|
||||
(#any-of? @storageclass "CACHE" "PARENT_SCOPE")
|
||||
)
|
||||
|
||||
(normal_command
|
||||
(identifier) @_function
|
||||
(#match? @_function "\\c^list$")
|
||||
. (argument) @constant
|
||||
(#any-of? @constant "LENGTH" "GET" "JOIN" "SUBLIST" "FIND")
|
||||
. (argument) @variable
|
||||
(argument) @variable .
|
||||
)
|
||||
(normal_command
|
||||
(identifier) @_function
|
||||
(#match? @_function "\\c^list$")
|
||||
. (argument) @constant
|
||||
. (argument) @variable
|
||||
(#any-of? @constant "APPEND" "FILTER" "INSERT"
|
||||
"POP_BACK" "POP_FRONT" "PREPEND"
|
||||
"REMOVE_ITEM" "REMOVE_AT" "REMOVE_DUPLICATES"
|
||||
"REVERSE" "SORT")
|
||||
)
|
||||
(normal_command
|
||||
(identifier) @_function
|
||||
(#match? @_function "\\c^list$")
|
||||
. (argument) @_transform @constant
|
||||
. (argument) @variable
|
||||
. (argument) @_action @constant
|
||||
(#match? @_transform "TRANSFORM")
|
||||
(#any-of? @_action "APPEND" "PREPEND" "TOUPPER" "TOLOWER" "STRIP" "GENEX_STRIP" "REPLACE")
|
||||
)
|
||||
(normal_command
|
||||
(identifier) @_function
|
||||
(#match? @_function "\\c^list$")
|
||||
. (argument) @_transform @constant
|
||||
. (argument) @variable
|
||||
. (argument) @_action @constant
|
||||
. (argument)? @_selector @constant
|
||||
(#match? @_transform "TRANSFORM")
|
||||
(#any-of? @_action "APPEND" "PREPEND" "TOUPPER" "TOLOWER" "STRIP" "GENEX_STRIP" "REPLACE")
|
||||
(#any-of? @_selector "AT" "FOR" "REGEX")
|
||||
)
|
||||
(normal_command
|
||||
(identifier) @_function
|
||||
(#match? @_function "\\c^list$")
|
||||
. (argument) @_transform @constant
|
||||
(argument) @constant .
|
||||
(argument) @variable
|
||||
(#match? @_transform "TRANSFORM")
|
||||
(#match? @constant "OUTPUT_VARIABLE")
|
||||
)
|
||||
|
||||
(escape_sequence) @string.escape
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue