mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 02:40:09 -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 @@
|
||||||
|
(identifier) @variable
|
||||||
(user_type_identifier) @type
|
(type_identifier) @type
|
||||||
|
|
||||||
(var_identifier) @variable
|
|
||||||
|
|
||||||
(state_identifier) @field
|
|
||||||
|
|
||||||
(var_identifier
|
|
||||||
(post_identifier) @variable)
|
|
||||||
|
|
||||||
(function_identifier) @function
|
|
||||||
|
|
||||||
(reference_identifier) @keyword
|
|
||||||
(visibility_modifier) @include
|
|
||||||
|
|
||||||
(comment) @comment
|
(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
|
; (state_identifier) @field
|
||||||
(int_number) @number
|
|
||||||
(string) @string
|
|
||||||
|
|
||||||
[
|
[
|
||||||
"in"
|
"in"
|
||||||
|
|
@ -39,7 +47,8 @@
|
||||||
[
|
[
|
||||||
"root"
|
"root"
|
||||||
"parent"
|
"parent"
|
||||||
"this"
|
"duration"
|
||||||
|
"easing"
|
||||||
] @variable.builtin
|
] @variable.builtin
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
@ -62,23 +71,25 @@
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
[
|
[
|
||||||
"black"
|
"black"
|
||||||
"transparent"
|
"transparent"
|
||||||
"blue"
|
"blue"
|
||||||
"ease"
|
"ease"
|
||||||
"ease_in"
|
"ease_in"
|
||||||
"ease-in"
|
"ease-in"
|
||||||
"ease_in_out"
|
"ease_in_out"
|
||||||
"ease-in-out"
|
"ease-in-out"
|
||||||
"ease_out"
|
"ease_out"
|
||||||
"ease-out"
|
"ease-out"
|
||||||
"end"
|
"end"
|
||||||
"green"
|
"green"
|
||||||
"red"
|
"red"
|
||||||
"red"
|
"red"
|
||||||
"start"
|
"start"
|
||||||
"yellow"
|
"yellow"
|
||||||
] @constant.builtin
|
"white"
|
||||||
|
"gray"
|
||||||
|
] @constant.builtin
|
||||||
|
|
||||||
|
|
||||||
; Punctuation
|
; Punctuation
|
||||||
|
|
@ -99,15 +110,13 @@
|
||||||
"}"
|
"}"
|
||||||
] @punctuation.bracket
|
] @punctuation.bracket
|
||||||
|
|
||||||
(property_definition ["<" ">"] @punctuation.bracket)
|
(define_property ["<" ">"] @punctuation.bracket)
|
||||||
|
|
||||||
[
|
[
|
||||||
"angle"
|
"angle"
|
||||||
"bool"
|
"bool"
|
||||||
"brush"
|
"brush"
|
||||||
; "color" // This causes problems
|
"color"
|
||||||
"duration"
|
|
||||||
"easing"
|
|
||||||
"float"
|
"float"
|
||||||
"image"
|
"image"
|
||||||
"int"
|
"int"
|
||||||
|
|
@ -139,8 +148,7 @@
|
||||||
"*="
|
"*="
|
||||||
"/="
|
"/="
|
||||||
"?"
|
"?"
|
||||||
|
|
||||||
"=>"
|
"=>"
|
||||||
] @operator
|
] @operator
|
||||||
|
|
||||||
(ternary_expression [":" "?"] @conditional.ternary)
|
(ternary_expression [":" "?"] @conditional.ternary)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue