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,12 +1,10 @@
; Preproc
[
(unique_id)
(top_level_annotation_body)
] @keyword.directive
; Includes
[
"import"
"$import"
@ -17,7 +15,6 @@
(import_path) @string.special.path
; Keywords
[
"annotation"
"enum"
@ -30,10 +27,7 @@
] @keyword
; Builtins
[
"const"
] @type.qualifier
"const" @type.qualifier
[
(primitive_type)
@ -41,30 +35,24 @@
] @type.builtin
; Typedefs
(type_definition) @type.definition
; Labels (@number, @number!)
(field_version) @label
; Methods
[
(annotation_definition_identifier)
(method_identifier)
] @function.method
; Fields
(field_identifier) @variable.member
; Properties
(property) @property
; Parameters
[
(param_identifier)
(return_identifier)
@ -73,7 +61,6 @@
(annotation_target) @variable.parameter.builtin
; Constants
[
(const_identifier)
(local_const)
@ -83,7 +70,6 @@
(void) @constant.builtin
; Types
[
(enum_identifier)
(extend_type)
@ -91,18 +77,15 @@
] @type
; Attributes
[
(annotation_identifier)
(attribute)
] @attribute
; Operators
"=" @operator
; Literals
[
(string)
(concatenated_string)
@ -125,18 +108,26 @@
(data_hex) @string.special.symbol
; Punctuation
[
"*"
"$"
":"
] @punctuation.special
["{" "}"] @punctuation.bracket
[
"{"
"}"
] @punctuation.bracket
["(" ")"] @punctuation.bracket
[
"("
")"
] @punctuation.bracket
["[" "]"] @punctuation.bracket
[
"["
"]"
] @punctuation.bracket
[
"."
@ -146,5 +137,4 @@
] @punctuation.delimiter
; Comments
(comment) @comment @spell

View file

@ -13,14 +13,17 @@
(field)
] @indent.begin
((struct_shorthand (property)) @indent.align
((struct_shorthand
(property)) @indent.align
(#set! indent.open_delimiter "(")
(#set! indent.close_delimiter ")"))
((method (field_version)) @indent.align
((method
(field_version)) @indent.align
(#set! indent.open_delimiter field_version))
((const_list (const_value)) @indent.align
((const_list
(const_value)) @indent.align
(#set! indent.open_delimiter "[")
(#set! indent.close_delimiter "]"))
@ -31,7 +34,6 @@
")"
] @indent.end @indent.branch
[
(ERROR)
(comment)

View file

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

View file

@ -18,17 +18,21 @@
(extend_type)
(field_type)
] @local.reference
(custom_type (type_identifier) @local.reference)
(custom_type
(type_identifier) @local.reference)
(custom_type
(generics
(generic_parameters
(generic_parameters
(generic_identifier) @local.reference)))
(annotation_definition_identifier) @local.definition
(const_identifier) @local.definition.constant
(enum (enum_identifier) @local.definition.enum)
(enum
(enum_identifier) @local.definition.enum)
[
(enum_member)
@ -44,16 +48,19 @@
(return_identifier)
] @local.definition.parameter
(group (type_identifier) @local.definition.type)
(group
(type_identifier) @local.definition.type)
(struct (type_identifier) @local.definition.type)
(struct
(type_identifier) @local.definition.type)
(union (type_identifier) @local.definition.type)
(union
(type_identifier) @local.definition.type)
(interface (type_identifier) @local.definition.type)
(interface
(type_identifier) @local.definition.type)
; Generics Related (don't know how to combine these)
(struct
(generics
(generic_parameters