chore: query formatting

This commit is contained in:
Pham Huy Hoang 2024-01-06 15:05:50 +09:00 committed by Christian Clason
parent 79975d6557
commit 57a8acf0c4
674 changed files with 18466 additions and 12648 deletions

View file

@ -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)))

View file

@ -12,22 +12,22 @@
"for"
] @indent.begin
((binary operator: (special)) @indent.begin)
((binary
operator: (special)) @indent.begin)
[
"}"
")"
] @indent.branch
((formal_parameters (identifier)) @indent.align
(#set! indent.open_delimiter "(")
(#set! indent.close_delimiter ")"))
((formal_parameters
(identifier)) @indent.align
(#set! indent.open_delimiter "(")
(#set! indent.close_delimiter ")"))
[
")"
"}"
] @indent.end
[
(comment)
] @indent.ignore
(comment) @indent.ignore

View file

@ -1,2 +1,2 @@
((comment) @injection.content
(#set! injection.language "comment"))
(#set! injection.language "comment"))

View file

@ -1,11 +1,16 @@
; locals.scm
(function_definition) @local.scope
(formal_parameters (identifier) @local.definition.parameter)
(formal_parameters
(identifier) @local.definition.parameter)
(left_assignment name: (identifier) @local.definition)
(equals_assignment name: (identifier) @local.definition)
(right_assignment name: (identifier) @local.definition)
(left_assignment
name: (identifier) @local.definition)
(equals_assignment
name: (identifier) @local.definition)
(right_assignment
name: (identifier) @local.definition)
(identifier) @local.reference