helix-mirror/runtime/queries/slint/highlights.scm

171 lines
2.0 KiB
Scheme
Raw Permalink Normal View History

2023-08-13 11:18:57 +04:00
(identifier) @variable
[
(type_identifier)
(units)
]@type
2023-08-13 11:18:57 +04:00
(array_literal
(identifier) @type)
2023-08-13 11:18:57 +04:00
(function_identifier) @function
[
(image_macro)
(children_macro)
(radial_grad_macro)
(linear_grad_macro)
] @function.macro
2023-08-13 11:18:57 +04:00
(call_expression
function: (identifier) @function)
(call_expression
function: (field_expression
field: (identifier) @function))
2023-08-13 11:18:57 +04:00
(vis) @keyword.control.import
2023-08-13 11:18:57 +04:00
(transition_statement state: (identifier) @variable.other.member)
(state_expression state: (identifier) @variable.other.member)
(struct_block_definition field: (identifier) @variable.other.member)
(assign_property (identifier) @attribute)
(comment) @comment
2023-08-13 11:18:57 +04:00
(string_literal) @string
(int_literal) @constant.numeric.integer
(float_literal) @constant.numeric.float
[
"in"
"in-out"
"for"
] @keyword.control.repeat
[
"import"
"export"
"from"
] @keyword.control.import
[
"if"
"else"
"when"
] @keyword.control.conditional
[
"struct"
"property"
] @keyword.storage.type
[
"global"
] @keyword.storage.modifier
[
2023-08-13 11:18:57 +04:00
"root"
"parent"
"duration"
"easing"
] @variable.builtin
[
"callback"
"animate"
"states"
"out"
"transitions"
"component"
"inherits"
] @keyword
[
2023-08-13 11:18:57 +04:00
"black"
"transparent"
"blue"
"ease"
"ease_in"
"ease-in"
"ease_in_out"
"ease-in-out"
"ease_out"
"ease-out"
"end"
"green"
"red"
"start"
"yellow"
"white"
"gray"
] @constant.builtin
2023-08-13 11:18:57 +04:00
[
"true"
"false"
] @constant.builtin.boolean
"@" @keyword
; ; Punctuation
[
","
"."
2023-08-13 11:18:57 +04:00
";"
":"
] @punctuation.delimiter
; ; Brackets
[
2023-08-13 11:18:57 +04:00
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket
2023-08-13 11:18:57 +04:00
(define_property ["<" ">"] @punctuation.bracket)
[
2023-08-13 11:18:57 +04:00
"angle"
"bool"
"brush"
"color"
"duration"
"easing"
"float"
"image"
"int"
"length"
"percent"
"physical-length"
"physical_length"
"string"
] @type.builtin
[
":="
2023-08-13 11:18:57 +04:00
"<=>"
"!"
"-"
"+"
"*"
"/"
"&&"
"||"
">"
"<"
">="
"<="
"="
":"
"+="
"-="
"*="
"/="
"?"
2023-08-13 11:18:57 +04:00
"=>" ] @operator
(ternary_expression [":" "?"] @keyword.control.conditional)