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,10 +1,10 @@
[
(struct_declaration)
(function_declaration)
(if_statement)
(switch_statement)
(switch_body)
(loop_statement)
(for_statement)
(while_statement)
(struct_declaration)
(function_declaration)
(if_statement)
(switch_statement)
(switch_body)
(loop_statement)
(for_statement)
(while_statement)
] @fold

View file

@ -1,104 +1,126 @@
(identifier) @variable
(int_literal) @number
(float_literal) @number.float
(bool_literal) @boolean
(type_declaration) @type
(function_declaration
(identifier) @function)
(identifier) @function)
(parameter
(variable_identifier_declaration (identifier) @variable.parameter))
(variable_identifier_declaration
(identifier) @variable.parameter))
(struct_declaration
(identifier) @type)
(identifier) @type)
(struct_declaration
(struct_member (variable_identifier_declaration (identifier) @variable.member)))
(struct_member
(variable_identifier_declaration
(identifier) @variable.member)))
(type_constructor_or_function_call_expression
(type_declaration) @function.call)
(type_declaration) @function.call)
[
"struct"
"bitcast"
"discard"
"enable"
"fallthrough"
"let"
"type"
"var"
"override"
(texel_format)
"struct"
"bitcast"
"discard"
"enable"
"fallthrough"
"let"
"type"
"var"
"override"
(texel_format)
] @keyword
[
"private"
"storage"
"uniform"
"workgroup"
"private"
"storage"
"uniform"
"workgroup"
] @keyword.storage
[
"read"
"read_write"
"write"
"read"
"read_write"
"write"
] @type.qualifier
"fn" @keyword.function
"return" @keyword.return
[ "," "." ":" ";" "->" ] @punctuation.delimiter
["(" ")" "[" "]" "{" "}"] @punctuation.bracket
[
","
"."
":"
";"
"->"
] @punctuation.delimiter
[
"loop"
"for"
"while"
"break"
"continue"
"continuing"
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket
[
"loop"
"for"
"while"
"break"
"continue"
"continuing"
] @keyword.repeat
[
"if"
"else"
"switch"
"case"
"default"
"if"
"else"
"switch"
"case"
"default"
] @keyword.conditional
[
"&"
"&&"
"/"
"!"
"="
"=="
"!="
">"
">="
">>"
"<"
"<="
"<<"
"%"
"-"
"+"
"|"
"||"
"*"
"~"
"^"
"@"
"++"
"--"
"&"
"&&"
"/"
"!"
"="
"=="
"!="
">"
">="
">>"
"<"
"<="
"<<"
"%"
"-"
"+"
"|"
"||"
"*"
"~"
"^"
"@"
"++"
"--"
] @operator
(attribute
(identifier) @attribute)
(identifier) @attribute)
[(line_comment) (block_comment)] @comment @spell
[
(line_comment)
(block_comment)
] @comment @spell

View file

@ -5,10 +5,17 @@
(struct_declaration)
] @indent.begin
(compound_statement "}" @indent.end)
(loop_statement "}" @indent.end)
(function_declaration ")" @indent.end)
(struct_declaration "}" @indent.end)
(compound_statement
"}" @indent.end)
(loop_statement
"}" @indent.end)
(function_declaration
")" @indent.end)
(struct_declaration
"}" @indent.end)
[
"else"
@ -16,4 +23,7 @@
"}"
] @indent.branch
[(line_comment) (block_comment)] @indent.auto
[
(line_comment)
(block_comment)
] @indent.auto