helix-mods/runtime/queries/wgsl/highlights.scm

118 lines
1.4 KiB
Scheme
Raw Normal View History

2022-10-01 00:43:07 +02:00
(int_literal) @constant.numeric.integer
(float_literal) @constant.numeric.float
(bool_literal) @constant.builtin.boolean
2021-11-27 03:19:40 +01:00
[
"bitcast"
"discard"
"enable"
"fallthrough"
] @keyword
2021-11-27 03:19:40 +01:00
[
"let"
"override"
"struct"
"type"
"var"
(texel_format)
] @keyword.storage.type
2021-11-27 03:19:40 +01:00
[
(access_mode)
(address_space)
] @keyword.storage.modifier
2021-11-27 03:19:40 +01:00
2022-10-01 00:43:07 +02:00
"fn" @keyword.function
2021-11-27 03:19:40 +01:00
2022-10-01 00:43:07 +02:00
"return" @keyword.control.return
2021-11-27 03:19:40 +01:00
2022-10-01 00:43:07 +02:00
["," "." ":" ";"] @punctuation.delimiter
["(" ")" "[" "]" "{" "}"] @punctuation.bracket
2021-11-27 03:19:40 +01:00
(type_declaration ["<" ">"] @punctuation.bracket)
2021-11-27 03:19:40 +01:00
[
"break"
"continue"
"continuing"
] @keyword.control
[
"loop"
"for"
"while"
2021-11-27 03:19:40 +01:00
] @keyword.control.repeat
[
"if"
"else"
"switch"
"case"
"default"
2021-11-27 03:19:40 +01:00
] @keyword.control.conditional
[
"!"
"!="
"%"
"%="
"&"
"&&"
"&="
"*"
"*="
"+"
"++"
"+="
"-"
"--"
"-="
"->"
"/"
"/="
"<"
"<<"
"<="
"="
"=="
">"
">="
">>"
"@"
"^"
"^="
"|"
"|="
"||"
"~"
2021-11-27 03:19:40 +01:00
] @operator
(function_declaration
(identifier) @function)
(parameter
(variable_identifier_declaration
(identifier) @variable.parameter))
(struct_declaration
(identifier) @type)
(struct_declaration
(struct_member
(variable_identifier_declaration
(identifier) @variable.other.member)))
(type_constructor_or_function_call_expression
(type_declaration (identifier) @function))
(type_declaration _ @type)
2021-11-27 03:19:40 +01:00
(attribute
(identifier) @attribute)
2021-11-27 03:19:40 +01:00
(identifier) @variable
2021-11-27 03:19:40 +01:00
(comment) @comment