mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat!: drop modules, general refactor and cleanup
This commit is contained in:
parent
310f0925ec
commit
692b051b09
1247 changed files with 6096 additions and 9074 deletions
10
runtime/queries/wgsl/folds.scm
Normal file
10
runtime/queries/wgsl/folds.scm
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[
|
||||
(struct_declaration)
|
||||
(function_declaration)
|
||||
(if_statement)
|
||||
(switch_statement)
|
||||
(switch_body)
|
||||
(loop_statement)
|
||||
(for_statement)
|
||||
(while_statement)
|
||||
] @fold
|
||||
127
runtime/queries/wgsl/highlights.scm
Normal file
127
runtime/queries/wgsl/highlights.scm
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
(identifier) @variable
|
||||
|
||||
(int_literal) @number
|
||||
|
||||
(float_literal) @number.float
|
||||
|
||||
(bool_literal) @boolean
|
||||
|
||||
(type_declaration) @type
|
||||
|
||||
(function_declaration
|
||||
(identifier) @function)
|
||||
|
||||
(parameter
|
||||
(variable_identifier_declaration
|
||||
(identifier) @variable.parameter))
|
||||
|
||||
(struct_declaration
|
||||
(identifier) @type)
|
||||
|
||||
(struct_declaration
|
||||
(struct_member
|
||||
(variable_identifier_declaration
|
||||
(identifier) @variable.member)))
|
||||
|
||||
(type_constructor_or_function_call_expression
|
||||
(type_declaration) @function.call)
|
||||
|
||||
[
|
||||
"bitcast"
|
||||
"discard"
|
||||
"enable"
|
||||
"fallthrough"
|
||||
"let"
|
||||
"type"
|
||||
"var"
|
||||
"override"
|
||||
(texel_format)
|
||||
] @keyword
|
||||
|
||||
"struct" @keyword.type
|
||||
|
||||
[
|
||||
"private"
|
||||
"storage"
|
||||
"uniform"
|
||||
"workgroup"
|
||||
] @keyword.modifier
|
||||
|
||||
[
|
||||
"read"
|
||||
"read_write"
|
||||
"write"
|
||||
] @keyword.modifier
|
||||
|
||||
"fn" @keyword.function
|
||||
|
||||
"return" @keyword.return
|
||||
|
||||
[
|
||||
","
|
||||
"."
|
||||
":"
|
||||
";"
|
||||
"->"
|
||||
] @punctuation.delimiter
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
"loop"
|
||||
"for"
|
||||
"while"
|
||||
"break"
|
||||
"continue"
|
||||
"continuing"
|
||||
] @keyword.repeat
|
||||
|
||||
[
|
||||
"if"
|
||||
"else"
|
||||
"switch"
|
||||
"case"
|
||||
"default"
|
||||
] @keyword.conditional
|
||||
|
||||
[
|
||||
"&"
|
||||
"&&"
|
||||
"/"
|
||||
"!"
|
||||
"="
|
||||
"=="
|
||||
"!="
|
||||
">"
|
||||
">="
|
||||
">>"
|
||||
"<"
|
||||
"<="
|
||||
"<<"
|
||||
"%"
|
||||
"-"
|
||||
"+"
|
||||
"|"
|
||||
"||"
|
||||
"*"
|
||||
"~"
|
||||
"^"
|
||||
"@"
|
||||
"++"
|
||||
"--"
|
||||
] @operator
|
||||
|
||||
(attribute
|
||||
(identifier) @attribute)
|
||||
|
||||
[
|
||||
(line_comment)
|
||||
(block_comment)
|
||||
] @comment @spell
|
||||
43
runtime/queries/wgsl/indents.scm
Normal file
43
runtime/queries/wgsl/indents.scm
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
[
|
||||
(compound_statement)
|
||||
(loop_statement)
|
||||
(struct_declaration)
|
||||
(type_constructor_or_function_call_expression)
|
||||
] @indent.begin
|
||||
|
||||
((parameter_list) @indent.begin
|
||||
(#set! indent.immediate)
|
||||
(#set! indent.start_at_same_line))
|
||||
|
||||
(function_declaration
|
||||
"(" @indent.begin
|
||||
(#set! indent.immediate))
|
||||
|
||||
(ERROR
|
||||
"fn"
|
||||
(identifier)
|
||||
"(" @indent.begin
|
||||
(#set! indent.immediate))
|
||||
|
||||
(compound_statement
|
||||
"}" @indent.end)
|
||||
|
||||
(loop_statement
|
||||
"}" @indent.end)
|
||||
|
||||
(function_declaration
|
||||
")" @indent.end)
|
||||
|
||||
(struct_declaration
|
||||
"}" @indent.end)
|
||||
|
||||
[
|
||||
"else"
|
||||
")"
|
||||
"}"
|
||||
] @indent.branch
|
||||
|
||||
[
|
||||
(line_comment)
|
||||
(block_comment)
|
||||
] @indent.auto
|
||||
5
runtime/queries/wgsl/injections.scm
Normal file
5
runtime/queries/wgsl/injections.scm
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
([
|
||||
(line_comment)
|
||||
(block_comment)
|
||||
] @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue