mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
Update slint highlight queries for rewrite
This commit is contained in:
parent
57e9e48f88
commit
55a9e3bbbc
1 changed files with 50 additions and 42 deletions
|
|
@ -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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue