mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 11:20:07 -04:00
chore: query formatting
This commit is contained in:
parent
79975d6557
commit
57a8acf0c4
674 changed files with 18466 additions and 12648 deletions
|
|
@ -1,59 +1,69 @@
|
|||
; Types
|
||||
|
||||
(class_identifier
|
||||
(identifier) @type)
|
||||
|
||||
(primitive_type) @type.builtin
|
||||
|
||||
((class_identifier
|
||||
. (identifier) @_first @type.builtin
|
||||
(identifier) @type.builtin)
|
||||
.
|
||||
(identifier) @_first @type.builtin
|
||||
(identifier) @type.builtin)
|
||||
(#any-of? @_first "android" "dalvik" "java" "kotlinx"))
|
||||
|
||||
((class_identifier
|
||||
. (identifier) @_first @type.builtin
|
||||
. (identifier) @_second @type.builtin
|
||||
(identifier) @type.builtin)
|
||||
.
|
||||
(identifier) @_first @type.builtin
|
||||
.
|
||||
(identifier) @_second @type.builtin
|
||||
(identifier) @type.builtin)
|
||||
(#eq? @_first "com")
|
||||
(#any-of? @_second "android" "google"))
|
||||
|
||||
; Methods
|
||||
|
||||
(method_definition
|
||||
(method_signature (method_identifier) @function.method))
|
||||
(method_signature
|
||||
(method_identifier) @function.method))
|
||||
|
||||
(expression
|
||||
(opcode) @_invoke
|
||||
(body
|
||||
(full_method_signature
|
||||
(method_signature (method_identifier) @function.method.call)))
|
||||
(body
|
||||
(full_method_signature
|
||||
(method_signature
|
||||
(method_identifier) @function.method.call)))
|
||||
(#lua-match? @_invoke "^invoke"))
|
||||
|
||||
(method_handle
|
||||
(full_method_signature
|
||||
(method_signature (method_identifier) @function.method.call)))
|
||||
(method_signature
|
||||
(method_identifier) @function.method.call)))
|
||||
|
||||
(custom_invoke
|
||||
. (identifier) @function.method.call
|
||||
(method_signature (method_identifier) @function.method.call))
|
||||
.
|
||||
(identifier) @function.method.call
|
||||
(method_signature
|
||||
(method_identifier) @function.method.call))
|
||||
|
||||
(annotation_value
|
||||
(body
|
||||
(method_signature (method_identifier) @function.method.call)))
|
||||
(method_signature
|
||||
(method_identifier) @function.method.call)))
|
||||
|
||||
(annotation_value
|
||||
(body
|
||||
(full_method_signature
|
||||
(method_signature (method_identifier) @function.method.call))))
|
||||
(method_signature
|
||||
(method_identifier) @function.method.call))))
|
||||
|
||||
(field_definition
|
||||
(body
|
||||
(method_signature (method_identifier) @function.method.call)))
|
||||
(body
|
||||
(method_signature
|
||||
(method_identifier) @function.method.call)))
|
||||
|
||||
(field_definition
|
||||
(body
|
||||
(full_method_signature
|
||||
(method_signature (method_identifier) @function.method.call))))
|
||||
(body
|
||||
(full_method_signature
|
||||
(method_signature
|
||||
(method_identifier) @function.method.call))))
|
||||
|
||||
((method_identifier) @constructor
|
||||
(#any-of? @constructor "<init>" "<clinit>"))
|
||||
|
|
@ -61,7 +71,6 @@
|
|||
"constructor" @constructor
|
||||
|
||||
; Fields
|
||||
|
||||
[
|
||||
(field_identifier)
|
||||
(annotation_key)
|
||||
|
|
@ -71,26 +80,23 @@
|
|||
(#lua-match? @constant "^[%u_]*$"))
|
||||
|
||||
; Variables
|
||||
|
||||
(variable) @variable.builtin
|
||||
|
||||
(local_directive
|
||||
(identifier) @variable)
|
||||
|
||||
; Parameters
|
||||
|
||||
(parameter) @variable.parameter.builtin
|
||||
|
||||
(param_identifier) @variable.parameter
|
||||
|
||||
; Labels
|
||||
|
||||
[
|
||||
(label)
|
||||
(jmp_label)
|
||||
] @label
|
||||
|
||||
; Operators
|
||||
|
||||
(opcode) @keyword.operator
|
||||
|
||||
((opcode) @keyword.return
|
||||
|
|
@ -114,7 +120,6 @@
|
|||
] @operator
|
||||
|
||||
; Keywords
|
||||
|
||||
[
|
||||
".class"
|
||||
".super"
|
||||
|
|
@ -146,9 +151,7 @@
|
|||
(epilogue_directive)
|
||||
] @keyword
|
||||
|
||||
[
|
||||
".source"
|
||||
] @keyword.import
|
||||
".source" @keyword.import
|
||||
|
||||
[
|
||||
".method"
|
||||
|
|
@ -161,9 +164,14 @@
|
|||
] @keyword.exception
|
||||
|
||||
; Literals
|
||||
|
||||
(string) @string
|
||||
(source_directive (string "\"" _ @string.special.url "\""))
|
||||
|
||||
(source_directive
|
||||
(string
|
||||
"\""
|
||||
_ @string.special.url
|
||||
"\""))
|
||||
|
||||
(escape_sequence) @string.escape
|
||||
|
||||
(character) @character
|
||||
|
|
@ -173,9 +181,9 @@
|
|||
(number) @number
|
||||
|
||||
[
|
||||
(float)
|
||||
(NaN)
|
||||
(Infinity)
|
||||
(float)
|
||||
(NaN)
|
||||
(Infinity)
|
||||
] @number.float
|
||||
|
||||
(boolean) @boolean
|
||||
|
|
@ -183,7 +191,6 @@
|
|||
(null) @constant.builtin
|
||||
|
||||
; Misc
|
||||
|
||||
(annotation_visibility) @keyword.storage
|
||||
|
||||
(access_modifier) @type.qualifier
|
||||
|
|
@ -191,9 +198,15 @@
|
|||
(array_type
|
||||
"[" @punctuation.special)
|
||||
|
||||
["{" "}"] @punctuation.bracket
|
||||
[
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
["(" ")"] @punctuation.bracket
|
||||
[
|
||||
"("
|
||||
")"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
"->"
|
||||
|
|
@ -204,10 +217,10 @@
|
|||
"/"
|
||||
] @punctuation.delimiter
|
||||
|
||||
(line_directive (number) @string.special)
|
||||
(line_directive
|
||||
(number) @string.special)
|
||||
|
||||
; Comments
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
(class_definition
|
||||
|
|
|
|||
|
|
@ -24,7 +24,10 @@
|
|||
"}"
|
||||
] @indent.end @indent.branch
|
||||
|
||||
[ "{" "}" ] @indent.branch
|
||||
[
|
||||
"{"
|
||||
"}"
|
||||
] @indent.branch
|
||||
|
||||
[
|
||||
(ERROR)
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
(#set! injection.language "comment"))
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@
|
|||
(annotation_key) @local.definition.field
|
||||
|
||||
(method_definition
|
||||
(method_signature (method_identifier) @local.definition.method))
|
||||
(method_signature
|
||||
(method_identifier) @local.definition.method))
|
||||
|
||||
(param_identifier) @local.definition.parameter
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue