mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-12 08:20:05 -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"))
|
||||
|
|
|
|||
|
|
@ -1,12 +1,8 @@
|
|||
[
|
||||
(list)
|
||||
] @indent.begin
|
||||
(list) @indent.begin
|
||||
|
||||
[
|
||||
"["
|
||||
"]"
|
||||
] @indent.begin
|
||||
|
||||
[
|
||||
"]"
|
||||
] @indent.branch
|
||||
"]" @indent.branch
|
||||
|
|
|
|||
|
|
@ -1,23 +1,31 @@
|
|||
((predicate
|
||||
((predicate
|
||||
name: (identifier) @_name
|
||||
parameters: (parameters (string) @injection.content))
|
||||
(#any-of? @_name "match" "not-match" "vim-match" "not-vim-match")
|
||||
(#set! injection.language "regex")
|
||||
(#offset! @injection.content 0 1 0 -1))
|
||||
parameters:
|
||||
(parameters
|
||||
(string) @injection.content))
|
||||
(#any-of? @_name "match" "not-match" "vim-match" "not-vim-match")
|
||||
(#set! injection.language "regex")
|
||||
(#offset! @injection.content 0 1 0 -1))
|
||||
|
||||
((predicate
|
||||
name: (identifier) @_name
|
||||
parameters: (parameters (string) @injection.content))
|
||||
(#any-of? @_name "lua-match" "not-lua-match")
|
||||
(#set! injection.language "luap")
|
||||
(#offset! @injection.content 0 1 0 -1))
|
||||
parameters:
|
||||
(parameters
|
||||
(string) @injection.content))
|
||||
(#any-of? @_name "lua-match" "not-lua-match")
|
||||
(#set! injection.language "luap")
|
||||
(#offset! @injection.content 0 1 0 -1))
|
||||
|
||||
((predicate
|
||||
name: (identifier) @_name
|
||||
parameters: (parameters (string) @injection.content . (string) .))
|
||||
(#any-of? @_name "gsub" "not-gsub")
|
||||
(#set! injection.language "luap")
|
||||
(#offset! @injection.content 0 1 0 -1))
|
||||
name: (identifier) @_name
|
||||
parameters:
|
||||
(parameters
|
||||
(string) @injection.content
|
||||
.
|
||||
(string) .))
|
||||
(#any-of? @_name "gsub" "not-gsub")
|
||||
(#set! injection.language "luap")
|
||||
(#offset! @injection.content 0 1 0 -1))
|
||||
|
||||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
(#set! injection.language "comment"))
|
||||
|
|
|
|||
|
|
@ -1,7 +1,13 @@
|
|||
(program) @local.scope
|
||||
(program (named_node) @local.scope)
|
||||
(program (anonymous_node) @local.scope)
|
||||
(program (grouping) @local.scope)
|
||||
|
||||
(program
|
||||
(named_node) @local.scope)
|
||||
|
||||
(program
|
||||
(anonymous_node) @local.scope)
|
||||
|
||||
(program
|
||||
(grouping) @local.scope)
|
||||
|
||||
(identifier) @local.reference
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue