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,52 +1,62 @@
; Structs
;------------
(enum_variant) @constant
(struct_entry (identifier) @property)
(struct_entry (enum_variant (identifier) @constant))
(struct_name (identifier)) @type
(struct_entry
(identifier) @property)
(struct_entry
(enum_variant
(identifier) @constant))
(struct_name
(identifier)) @type
(unit_struct) @type.builtin
; Literals
;------------
(string) @string
(boolean) @boolean
(integer) @number
(float) @number.float
(char) @character
(boolean) @boolean
(integer) @number
(float) @number.float
(char) @character
; Comments
;------------
[
(line_comment)
(block_comment)
] @comment @spell
; Punctuation
;------------
[
"{"
"}"
] @punctuation.bracket
["{" "}"] @punctuation.bracket
[
"("
")"
] @punctuation.bracket
["(" ")"] @punctuation.bracket
["[" "]"] @punctuation.bracket
[
"["
"]"
] @punctuation.bracket
[
","
":"
] @punctuation.delimiter
[
"-"
] @operator
"-" @operator
; Special
;------------
(escape_sequence) @string.escape

View file

@ -5,8 +5,17 @@
(struct)
] @indent.begin
[ "{" "}" ] @indent.branch
[
"{"
"}"
] @indent.branch
[ "(" ")" ] @indent.branch
[
"("
")"
] @indent.branch
[ "[" "]" ] @indent.branch
[
"["
"]"
] @indent.branch

View file

@ -2,4 +2,4 @@
(line_comment)
(block_comment)
] @injection.content
(#set! injection.language "comment"))
(#set! injection.language "comment"))

View file

@ -1,12 +1,25 @@
(source_file) @local.scope
(source_file (array) @local.scope)
(source_file (map) @local.scope)
(source_file (struct) @local.scope)
(source_file (tuple) @local.scope)
(source_file
(array) @local.scope)
(source_file
(map) @local.scope)
(source_file
(struct) @local.scope)
(source_file
(tuple) @local.scope)
(identifier) @local.reference
(struct_entry (identifier) @local.definition.field)
(struct_entry (identifier) @local.definition.enum (enum_variant))
(struct_entry
(identifier) @local.definition.field)
(struct (struct_name) @local.definition.type)
(struct_entry
(identifier) @local.definition.enum
(enum_variant))
(struct
(struct_name) @local.definition.type)