Update slint highlight queries for rewrite

This commit is contained in:
Jared Moulton 2022-12-25 14:36:28 -05:00 committed by Christian Clason
parent 57e9e48f88
commit 55a9e3bbbc

View file

@ -1,23 +1,31 @@
(user_type_identifier) @type
(var_identifier) @variable
(state_identifier) @field
(var_identifier
(post_identifier) @variable)
(function_identifier) @function
(reference_identifier) @keyword
(visibility_modifier) @include
(identifier) @variable
(type_identifier) @type
(comment) @comment
(int_literal) @number
(float_literal) @float
(string_literal) @string
(function_identifier) @function
[
(image_macro)
(children_macro)
(radial_grad_macro)
(linear_grad_macro)
] @function.macro
(call_expression
function: (identifier) @function.call)
(call_expression
function: (field_expression
field: (identifier) @function.call))
(vis) @include
(units) @type
(array_literal
(identifier) @type)
(transition_statement state: (identifier) @field)
(state_expression state: (identifier) @field)
(struct_block_definition
(identifier) @field)
(value) @number
(int_number) @number
(string) @string
; (state_identifier) @field
[
"in"
@ -39,7 +47,8 @@
[
"root"
"parent"
"this"
"duration"
"easing"
] @variable.builtin
[
@ -62,23 +71,25 @@
] @keyword
[
"black"
"transparent"
"blue"
"ease"
"ease_in"
"ease-in"
"ease_in_out"
"ease-in-out"
"ease_out"
"ease-out"
"end"
"green"
"red"
"red"
"start"
"yellow"
] @constant.builtin
"black"
"transparent"
"blue"
"ease"
"ease_in"
"ease-in"
"ease_in_out"
"ease-in-out"
"ease_out"
"ease-out"
"end"
"green"
"red"
"red"
"start"
"yellow"
"white"
"gray"
] @constant.builtin
; Punctuation
@ -99,15 +110,13 @@
"}"
] @punctuation.bracket
(property_definition ["<" ">"] @punctuation.bracket)
(define_property ["<" ">"] @punctuation.bracket)
[
"angle"
"bool"
"brush"
; "color" // This causes problems
"duration"
"easing"
"color"
"float"
"image"
"int"
@ -139,8 +148,7 @@
"*="
"/="
"?"
"=>"
] @operator
(ternary_expression [":" "?"] @conditional.ternary)
(ternary_expression [":" "?"] @conditional.ternary)