mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 10:50:06 -04:00
chore: query formatting
This commit is contained in:
parent
79975d6557
commit
57a8acf0c4
674 changed files with 18466 additions and 12648 deletions
|
|
@ -1,14 +1,30 @@
|
|||
(string) @string
|
||||
|
||||
(escape_sequence) @string.escape
|
||||
(capture (identifier) @type)
|
||||
(anonymous_node (identifier) @string)
|
||||
(predicate name: (identifier) @function.call)
|
||||
(named_node name: (identifier) @variable)
|
||||
(field_definition name: (identifier) @property)
|
||||
(negated_field "!" @operator (identifier) @property)
|
||||
|
||||
(capture
|
||||
(identifier) @type)
|
||||
|
||||
(anonymous_node
|
||||
(identifier) @string)
|
||||
|
||||
(predicate
|
||||
name: (identifier) @function.call)
|
||||
|
||||
(named_node
|
||||
name: (identifier) @variable)
|
||||
|
||||
(field_definition
|
||||
name: (identifier) @property)
|
||||
|
||||
(negated_field
|
||||
"!" @operator
|
||||
(identifier) @property)
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
(quantifier) @operator
|
||||
|
||||
(predicate_type) @punctuation.special
|
||||
|
||||
"." @operator
|
||||
|
|
@ -21,33 +37,51 @@
|
|||
] @punctuation.bracket
|
||||
|
||||
":" @punctuation.delimiter
|
||||
["@" "#"] @punctuation.special
|
||||
|
||||
[
|
||||
"@"
|
||||
"#"
|
||||
] @punctuation.special
|
||||
|
||||
"_" @constant
|
||||
|
||||
((parameters (identifier) @number)
|
||||
(#match? @number "^[-+]?[0-9]+(.[0-9]+)?$"))
|
||||
((parameters
|
||||
(identifier) @number)
|
||||
(#match? @number "^[-+]?[0-9]+(.[0-9]+)?$"))
|
||||
|
||||
((program . (comment)* . (comment) @keyword.import)
|
||||
(#lua-match? @keyword.import "^;+ *inherits *:"))
|
||||
((program
|
||||
.
|
||||
(comment)*
|
||||
.
|
||||
(comment) @keyword.import)
|
||||
(#lua-match? @keyword.import "^;+ *inherits *:"))
|
||||
|
||||
((program . (comment)* . (comment) @keyword.directive)
|
||||
(#lua-match? @keyword.directive "^;+ *extends *$"))
|
||||
((program
|
||||
.
|
||||
(comment)*
|
||||
.
|
||||
(comment) @keyword.directive)
|
||||
(#lua-match? @keyword.directive "^;+ *extends *$"))
|
||||
|
||||
((comment) @keyword.directive
|
||||
(#lua-match? @keyword.directive "^;+%s*format%-ignore%s*$"))
|
||||
|
||||
((predicate
|
||||
name: (identifier) @_name
|
||||
parameters: (parameters (string "\"" @string "\"" @string) @string.regexp))
|
||||
(#any-of? @_name
|
||||
"match"
|
||||
"not-match"
|
||||
"vim-match"
|
||||
"not-vim-match"
|
||||
"lua-match"
|
||||
"not-lua-match"))
|
||||
parameters:
|
||||
(parameters
|
||||
(string
|
||||
"\"" @string
|
||||
"\"" @string) @string.regexp))
|
||||
(#any-of? @_name "match" "not-match" "vim-match" "not-vim-match" "lua-match" "not-lua-match"))
|
||||
|
||||
((predicate
|
||||
name: (identifier) @_name
|
||||
parameters: (parameters (string "\"" @string "\"" @string) @string.regexp . (string) .))
|
||||
(#any-of? @_name "gsub" "not-gsub"))
|
||||
parameters:
|
||||
(parameters
|
||||
(string
|
||||
"\"" @string
|
||||
"\"" @string) @string.regexp
|
||||
.
|
||||
(string) .))
|
||||
(#any-of? @_name "gsub" "not-gsub"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue