mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-20 12:20: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,7 +1,5 @@
|
|||
; inherits: soql
|
||||
|
||||
;;; Apex + SOQL
|
||||
|
||||
; Apex + SOQL
|
||||
[
|
||||
"["
|
||||
"]"
|
||||
|
|
@ -17,16 +15,14 @@
|
|||
":"
|
||||
"?"
|
||||
";"
|
||||
] @punctuation.delimiter
|
||||
|
||||
;; Default general color defination
|
||||
] @punctuation.delimiter
|
||||
|
||||
; Default general color defination
|
||||
(identifier) @variable
|
||||
|
||||
(type_identifier) @type
|
||||
|
||||
;; Methods
|
||||
|
||||
; Methods
|
||||
(method_declaration
|
||||
name: (identifier) @function.method)
|
||||
|
||||
|
|
@ -35,13 +31,11 @@
|
|||
|
||||
(super) @function.builtin
|
||||
|
||||
;; Annotations
|
||||
|
||||
; Annotations
|
||||
(annotation
|
||||
name: (identifier) @attribute)
|
||||
|
||||
;; Types
|
||||
|
||||
; Types
|
||||
(interface_declaration
|
||||
name: (identifier) @type)
|
||||
|
||||
|
|
@ -49,7 +43,7 @@
|
|||
name: (identifier) @type)
|
||||
|
||||
(class_declaration
|
||||
(superclass) @type)
|
||||
(superclass) @type)
|
||||
|
||||
(enum_declaration
|
||||
name: (identifier) @type)
|
||||
|
|
@ -57,8 +51,11 @@
|
|||
(enum_constant
|
||||
name: (identifier) @constant)
|
||||
|
||||
(type_arguments "<" @punctuation.delimiter)
|
||||
(type_arguments ">" @punctuation.delimiter)
|
||||
(type_arguments
|
||||
"<" @punctuation.delimiter)
|
||||
|
||||
(type_arguments
|
||||
">" @punctuation.delimiter)
|
||||
|
||||
((field_access
|
||||
object: (identifier) @type))
|
||||
|
|
@ -68,11 +65,11 @@
|
|||
|
||||
((scoped_identifier
|
||||
scope: (identifier) @type)
|
||||
(#match? @type "^[A-Z]"))
|
||||
(#match? @type "^[A-Z]"))
|
||||
|
||||
((method_invocation
|
||||
object: (identifier) @type)
|
||||
(#match? @type "^[A-Z]"))
|
||||
(#match? @type "^[A-Z]"))
|
||||
|
||||
(method_declaration
|
||||
(formal_parameters
|
||||
|
|
@ -86,16 +83,21 @@
|
|||
|
||||
(assignment_operator) @operator
|
||||
|
||||
(update_expression ["++" "--"] @operator)
|
||||
(update_expression
|
||||
[
|
||||
"++"
|
||||
"--"
|
||||
] @operator)
|
||||
|
||||
(trigger_declaration
|
||||
name: (identifier) @type
|
||||
object: (identifier) @type
|
||||
(trigger_event) @keyword
|
||||
("," (trigger_event) @keyword)*)
|
||||
(","
|
||||
(trigger_event) @keyword)*)
|
||||
|
||||
[
|
||||
"@"
|
||||
"@"
|
||||
"="
|
||||
"!="
|
||||
"<="
|
||||
|
|
@ -103,35 +105,39 @@
|
|||
] @operator
|
||||
|
||||
(binary_expression
|
||||
operator: [
|
||||
">"
|
||||
"<"
|
||||
"=="
|
||||
"==="
|
||||
"!=="
|
||||
"&&"
|
||||
"||"
|
||||
"+"
|
||||
"-"
|
||||
"*"
|
||||
"/"
|
||||
"&"
|
||||
"|"
|
||||
"^"
|
||||
"%"
|
||||
"<<"
|
||||
">>"
|
||||
">>>"] @operator)
|
||||
operator:
|
||||
[
|
||||
">"
|
||||
"<"
|
||||
"=="
|
||||
"==="
|
||||
"!=="
|
||||
"&&"
|
||||
"||"
|
||||
"+"
|
||||
"-"
|
||||
"*"
|
||||
"/"
|
||||
"&"
|
||||
"|"
|
||||
"^"
|
||||
"%"
|
||||
"<<"
|
||||
">>"
|
||||
">>>"
|
||||
] @operator)
|
||||
|
||||
(unary_expression
|
||||
operator: [
|
||||
"+"
|
||||
"-"
|
||||
"!"
|
||||
"~"
|
||||
]) @operator
|
||||
operator:
|
||||
[
|
||||
"+"
|
||||
"-"
|
||||
"!"
|
||||
"~"
|
||||
]) @operator
|
||||
|
||||
(map_initializer "=>" @operator)
|
||||
(map_initializer
|
||||
"=>" @operator)
|
||||
|
||||
[
|
||||
(boolean_type)
|
||||
|
|
@ -139,18 +145,27 @@
|
|||
] @type.builtin
|
||||
|
||||
; Fields
|
||||
|
||||
(field_declaration
|
||||
declarator: (variable_declarator
|
||||
name: (identifier) @variable.member))
|
||||
declarator:
|
||||
(variable_declarator
|
||||
name: (identifier) @variable.member))
|
||||
|
||||
(field_access
|
||||
field: (identifier) @variable.member)
|
||||
|
||||
; Variables
|
||||
|
||||
(field_declaration
|
||||
(modifiers (modifier ["final" "static"])(modifier ["final" "static"]))
|
||||
(modifiers
|
||||
(modifier
|
||||
[
|
||||
"final"
|
||||
"static"
|
||||
])
|
||||
(modifier
|
||||
[
|
||||
"final"
|
||||
"static"
|
||||
]))
|
||||
(variable_declarator
|
||||
name: (identifier) @constant))
|
||||
|
||||
|
|
@ -163,7 +178,6 @@
|
|||
(this) @variable.builtin
|
||||
|
||||
; Literals
|
||||
|
||||
[
|
||||
(int)
|
||||
(decimal)
|
||||
|
|
@ -179,16 +193,15 @@
|
|||
|
||||
(null_literal) @constant.builtin
|
||||
|
||||
;; ;; Keywords
|
||||
|
||||
; ;; Keywords
|
||||
[
|
||||
"abstract"
|
||||
"final"
|
||||
"private"
|
||||
"protected"
|
||||
"public"
|
||||
"static"
|
||||
] @type.qualifier
|
||||
"abstract"
|
||||
"final"
|
||||
"private"
|
||||
"protected"
|
||||
"public"
|
||||
"static"
|
||||
] @type.qualifier
|
||||
|
||||
[
|
||||
"if"
|
||||
|
|
@ -203,16 +216,14 @@
|
|||
"break"
|
||||
] @keyword.repeat
|
||||
|
||||
[
|
||||
"return"
|
||||
] @keyword.return
|
||||
"return" @keyword.return
|
||||
|
||||
[
|
||||
"throw"
|
||||
"finally"
|
||||
"try"
|
||||
"catch"
|
||||
] @keyword.exception
|
||||
"throw"
|
||||
"finally"
|
||||
"try"
|
||||
"catch"
|
||||
] @keyword.exception
|
||||
|
||||
"new" @keyword.operator
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue