mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-09 06: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,13 +1,15 @@
|
|||
(variable) @variable
|
||||
|
||||
(identifier) @variable
|
||||
|
||||
((variable) @variable.builtin
|
||||
(#eq? @variable.builtin "$this"))
|
||||
(#eq? @variable.builtin "$this"))
|
||||
|
||||
(braced_expression) @none
|
||||
|
||||
(scoped_identifier
|
||||
(qualified_identifier
|
||||
(identifier) @type))
|
||||
(qualified_identifier
|
||||
(identifier) @type))
|
||||
|
||||
[
|
||||
(comment)
|
||||
|
|
@ -20,16 +22,16 @@
|
|||
"function" @keyword.function
|
||||
|
||||
[
|
||||
"type"
|
||||
"interface"
|
||||
"implements"
|
||||
"class"
|
||||
"using"
|
||||
"namespace"
|
||||
"attribute"
|
||||
"const"
|
||||
"extends"
|
||||
"insteadof"
|
||||
"type"
|
||||
"interface"
|
||||
"implements"
|
||||
"class"
|
||||
"using"
|
||||
"namespace"
|
||||
"attribute"
|
||||
"const"
|
||||
"extends"
|
||||
"insteadof"
|
||||
] @keyword
|
||||
|
||||
[
|
||||
|
|
@ -38,11 +40,11 @@
|
|||
] @keyword.coroutine
|
||||
|
||||
[
|
||||
"use"
|
||||
"include"
|
||||
"include_once"
|
||||
"require"
|
||||
"require_once"
|
||||
"use"
|
||||
"include"
|
||||
"include_once"
|
||||
"require"
|
||||
"require_once"
|
||||
] @keyword.import
|
||||
|
||||
[
|
||||
|
|
@ -80,9 +82,7 @@
|
|||
"noreturn"
|
||||
] @type.builtin
|
||||
|
||||
[
|
||||
(null)
|
||||
] @constant.builtin
|
||||
(null) @constant.builtin
|
||||
|
||||
[
|
||||
(true)
|
||||
|
|
@ -90,14 +90,23 @@
|
|||
] @boolean
|
||||
|
||||
(type_specifier) @type
|
||||
|
||||
(new_expression
|
||||
(_) @type)
|
||||
|
||||
(alias_declaration "newtype" . (_) @type)
|
||||
(alias_declaration "type" . (_) @type)
|
||||
(alias_declaration
|
||||
"newtype"
|
||||
.
|
||||
(_) @type)
|
||||
|
||||
(alias_declaration
|
||||
"type"
|
||||
.
|
||||
(_) @type)
|
||||
|
||||
(class_declaration
|
||||
name: (identifier) @type)
|
||||
|
||||
(type_parameter
|
||||
name: (identifier) @type)
|
||||
|
||||
|
|
@ -106,8 +115,8 @@
|
|||
(identifier) @type .))
|
||||
|
||||
[
|
||||
"@required"
|
||||
"@lateinit"
|
||||
"@required"
|
||||
"@lateinit"
|
||||
(attribute_modifier)
|
||||
] @attribute
|
||||
|
||||
|
|
@ -126,7 +135,6 @@
|
|||
"/="
|
||||
"%="
|
||||
"**="
|
||||
|
||||
"==>"
|
||||
"|>"
|
||||
"??"
|
||||
|
|
@ -154,13 +162,10 @@
|
|||
"/"
|
||||
"%"
|
||||
"**"
|
||||
|
||||
"++"
|
||||
"--"
|
||||
"!"
|
||||
|
||||
"?:"
|
||||
|
||||
"="
|
||||
"??="
|
||||
".="
|
||||
|
|
@ -176,110 +181,156 @@
|
|||
"%="
|
||||
"**="
|
||||
"=>"
|
||||
|
||||
;; type modifiers
|
||||
; type modifiers
|
||||
"@"
|
||||
"?"
|
||||
"~"
|
||||
] @operator
|
||||
|
||||
(integer) @number
|
||||
|
||||
(float) @number.float
|
||||
|
||||
(parameter
|
||||
(variable) @variable.parameter)
|
||||
|
||||
(call_expression
|
||||
function: (qualified_identifier (identifier) @function.call .))
|
||||
function:
|
||||
(qualified_identifier
|
||||
(identifier) @function.call .))
|
||||
|
||||
(call_expression
|
||||
function: (scoped_identifier (identifier) @function.call .))
|
||||
function:
|
||||
(scoped_identifier
|
||||
(identifier) @function.call .))
|
||||
|
||||
(call_expression
|
||||
function: (selection_expression
|
||||
(qualified_identifier (identifier) @function.method.call .)))
|
||||
function:
|
||||
(selection_expression
|
||||
(qualified_identifier
|
||||
(identifier) @function.method.call .)))
|
||||
|
||||
(qualified_identifier
|
||||
(_) @module .
|
||||
(_) @module
|
||||
.
|
||||
(_))
|
||||
|
||||
(use_statement
|
||||
(qualified_identifier
|
||||
(_) @module .)
|
||||
(_) @module .)
|
||||
(use_clause))
|
||||
|
||||
(use_statement
|
||||
(use_type "namespace")
|
||||
(use_type
|
||||
"namespace")
|
||||
(use_clause
|
||||
(qualified_identifier
|
||||
(identifier) @module .)
|
||||
(identifier) @module .)
|
||||
alias: (identifier)? @module))
|
||||
|
||||
(use_statement
|
||||
(use_type "const")
|
||||
(use_type
|
||||
"const")
|
||||
(use_clause
|
||||
(qualified_identifier
|
||||
(identifier) @constant .)
|
||||
(identifier) @constant .)
|
||||
alias: (identifier)? @constant))
|
||||
|
||||
(use_statement
|
||||
(use_type "function")
|
||||
(use_type
|
||||
"function")
|
||||
(use_clause
|
||||
(qualified_identifier
|
||||
(identifier) @function .)
|
||||
(identifier) @function .)
|
||||
alias: (identifier)? @function))
|
||||
|
||||
(use_statement
|
||||
(use_type "type")
|
||||
(use_type
|
||||
"type")
|
||||
(use_clause
|
||||
(qualified_identifier
|
||||
(identifier) @type .)
|
||||
(identifier) @type .)
|
||||
alias: (identifier)? @type))
|
||||
|
||||
(use_clause
|
||||
(use_type "namespace")
|
||||
(use_type
|
||||
"namespace")
|
||||
(qualified_identifier
|
||||
(_) @module .)
|
||||
(_) @module .)
|
||||
alias: (identifier)? @module)
|
||||
|
||||
(use_clause
|
||||
(use_type "function")
|
||||
(use_type
|
||||
"function")
|
||||
(qualified_identifier
|
||||
(_) @function .)
|
||||
(_) @function .)
|
||||
alias: (identifier)? @function)
|
||||
|
||||
(use_clause
|
||||
(use_type "const")
|
||||
(use_type
|
||||
"const")
|
||||
(qualified_identifier
|
||||
(_) @constant .)
|
||||
(_) @constant .)
|
||||
alias: (identifier)? @constant)
|
||||
|
||||
(use_clause
|
||||
(use_type "type")
|
||||
(use_type
|
||||
"type")
|
||||
(qualified_identifier
|
||||
(_) @type .)
|
||||
(_) @type .)
|
||||
alias: (identifier)? @type)
|
||||
|
||||
(function_declaration
|
||||
name: (identifier) @function)
|
||||
|
||||
(method_declaration
|
||||
name: (identifier) @function.method)
|
||||
|
||||
(type_arguments
|
||||
[ "<" ">" ] @punctuation.bracket)
|
||||
[ "(" ")" "[" "]" "{" "}" "<<" ">>"] @punctuation.bracket
|
||||
[
|
||||
"<"
|
||||
">"
|
||||
] @punctuation.bracket)
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
"<<"
|
||||
">>"
|
||||
] @punctuation.bracket
|
||||
|
||||
(xhp_open
|
||||
[ "<" ">" ] @tag.delimiter)
|
||||
(xhp_close
|
||||
[ "</" ">" ] @tag.delimiter)
|
||||
[
|
||||
"<"
|
||||
">"
|
||||
] @tag.delimiter)
|
||||
|
||||
(xhp_close
|
||||
[
|
||||
"</"
|
||||
">"
|
||||
] @tag.delimiter)
|
||||
|
||||
[
|
||||
"."
|
||||
";"
|
||||
"::"
|
||||
":"
|
||||
","
|
||||
] @punctuation.delimiter
|
||||
|
||||
[ "." ";" "::" ":" "," ] @punctuation.delimiter
|
||||
(qualified_identifier
|
||||
"\\" @punctuation.delimiter)
|
||||
|
||||
(ternary_expression
|
||||
["?" ":"] @keyword.conditional.ternary)
|
||||
[
|
||||
"?"
|
||||
":"
|
||||
] @keyword.conditional.ternary)
|
||||
|
||||
[
|
||||
"if"
|
||||
|
|
@ -305,11 +356,11 @@
|
|||
] @keyword.repeat
|
||||
|
||||
[
|
||||
(string)
|
||||
(xhp_string)
|
||||
(string)
|
||||
(xhp_string)
|
||||
] @string
|
||||
|
||||
[
|
||||
(xhp_open)
|
||||
(xhp_close)
|
||||
(xhp_open)
|
||||
(xhp_close)
|
||||
] @tag
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue