mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 19:30:02 -04:00
chore: query formatting
This commit is contained in:
parent
79975d6557
commit
57a8acf0c4
674 changed files with 18466 additions and 12648 deletions
|
|
@ -1,5 +1,4 @@
|
|||
; highlights.scm
|
||||
|
||||
; Literals
|
||||
(integer) @number
|
||||
|
||||
|
|
@ -8,96 +7,114 @@
|
|||
(complex) @number
|
||||
|
||||
(string) @string
|
||||
(string (escape_sequence) @string.escape)
|
||||
|
||||
(string
|
||||
(escape_sequence) @string.escape)
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
((program . (comment) @keyword.directive)
|
||||
((program
|
||||
.
|
||||
(comment) @keyword.directive)
|
||||
(#lua-match? @keyword.directive "^#!/"))
|
||||
|
||||
(identifier) @variable
|
||||
|
||||
((dollar (identifier) @variable.builtin)
|
||||
(#eq? @variable.builtin "self"))
|
||||
((dollar
|
||||
(identifier) @variable.builtin)
|
||||
(#eq? @variable.builtin "self"))
|
||||
|
||||
((dollar _ (identifier) @variable.member))
|
||||
((dollar
|
||||
_
|
||||
(identifier) @variable.member))
|
||||
|
||||
; Parameters
|
||||
|
||||
(formal_parameters (identifier) @variable.parameter)
|
||||
(formal_parameters
|
||||
(identifier) @variable.parameter)
|
||||
|
||||
(formal_parameters
|
||||
(default_parameter name: (identifier) @variable.parameter))
|
||||
(default_parameter
|
||||
name: (identifier) @variable.parameter))
|
||||
|
||||
(default_argument name: (identifier) @variable.parameter)
|
||||
(default_argument
|
||||
name: (identifier) @variable.parameter)
|
||||
|
||||
; Namespace
|
||||
(namespace_get
|
||||
namespace: (identifier) @module)
|
||||
|
||||
(namespace_get namespace: (identifier) @module)
|
||||
(namespace_get_internal namespace: (identifier) @module)
|
||||
(namespace_get_internal
|
||||
namespace: (identifier) @module)
|
||||
|
||||
; Operators
|
||||
[
|
||||
"="
|
||||
"<-"
|
||||
"<<-"
|
||||
"->"
|
||||
"="
|
||||
"<-"
|
||||
"<<-"
|
||||
"->"
|
||||
] @operator
|
||||
|
||||
(unary operator: [
|
||||
"-"
|
||||
"+"
|
||||
"!"
|
||||
"~"
|
||||
"?"
|
||||
] @operator)
|
||||
(unary
|
||||
operator:
|
||||
[
|
||||
"-"
|
||||
"+"
|
||||
"!"
|
||||
"~"
|
||||
"?"
|
||||
] @operator)
|
||||
|
||||
(binary operator: [
|
||||
"-"
|
||||
"+"
|
||||
"*"
|
||||
"/"
|
||||
"^"
|
||||
"<"
|
||||
">"
|
||||
"<="
|
||||
">="
|
||||
"=="
|
||||
"!="
|
||||
"||"
|
||||
"|"
|
||||
"&&"
|
||||
"&"
|
||||
":"
|
||||
"~"
|
||||
] @operator)
|
||||
(binary
|
||||
operator:
|
||||
[
|
||||
"-"
|
||||
"+"
|
||||
"*"
|
||||
"/"
|
||||
"^"
|
||||
"<"
|
||||
">"
|
||||
"<="
|
||||
">="
|
||||
"=="
|
||||
"!="
|
||||
"||"
|
||||
"|"
|
||||
"&&"
|
||||
"&"
|
||||
":"
|
||||
"~"
|
||||
] @operator)
|
||||
|
||||
[
|
||||
"|>"
|
||||
(special)
|
||||
] @operator
|
||||
|
||||
(lambda_function "\\" @operator)
|
||||
(lambda_function
|
||||
"\\" @operator)
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
(dollar _ "$" @operator)
|
||||
(dollar
|
||||
_
|
||||
"$" @operator)
|
||||
|
||||
(subset2
|
||||
"[[" @punctuation.bracket
|
||||
"]]" @punctuation.bracket)
|
||||
|
||||
[
|
||||
(dots)
|
||||
(break)
|
||||
(next)
|
||||
(dots)
|
||||
(break)
|
||||
(next)
|
||||
] @keyword
|
||||
|
||||
[
|
||||
|
|
@ -128,14 +145,19 @@
|
|||
"function" @keyword.function
|
||||
|
||||
; Functions/Methods
|
||||
|
||||
(call function: (identifier) @function.call)
|
||||
(call
|
||||
function: (identifier) @function.call)
|
||||
|
||||
(call
|
||||
(namespace_get function: (identifier) @function.call))
|
||||
(namespace_get
|
||||
function: (identifier) @function.call))
|
||||
|
||||
(call
|
||||
(namespace_get_internal function: (identifier) @function.call))
|
||||
(namespace_get_internal
|
||||
function: (identifier) @function.call))
|
||||
|
||||
(call
|
||||
function: ((dollar _ (identifier) @function.method.call)))
|
||||
function:
|
||||
((dollar
|
||||
_
|
||||
(identifier) @function.method.call)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue