mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 11:50:09 -04:00
fix(leo): highlights fixes (#5563)
* make sure affine_group has priority, so parens and comma will not be miscolored; added `annotation` as @attribute * `then` is not used as conditional, so moved to keywords * finalize function highlight added * differentiate between constant and variable variable identifiers
This commit is contained in:
parent
5c08a5301c
commit
0b50cf1592
1 changed files with 9 additions and 3 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
(variable) @variable
|
(variable_identifier) @variable
|
||||||
|
(constant_identifier) @constant
|
||||||
|
|
||||||
[
|
[
|
||||||
"assert"
|
"assert"
|
||||||
|
|
@ -13,6 +14,7 @@
|
||||||
"record"
|
"record"
|
||||||
"self"
|
"self"
|
||||||
"struct"
|
"struct"
|
||||||
|
"then"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
"in" @keyword.operator
|
"in" @keyword.operator
|
||||||
|
|
@ -43,7 +45,6 @@
|
||||||
[
|
[
|
||||||
"else"
|
"else"
|
||||||
"if"
|
"if"
|
||||||
"then"
|
|
||||||
] @conditional
|
] @conditional
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
@ -143,6 +144,9 @@
|
||||||
(transition_declaration
|
(transition_declaration
|
||||||
name: (identifier) @function.builtin)
|
name: (identifier) @function.builtin)
|
||||||
|
|
||||||
|
(finalizer
|
||||||
|
name: (identifier) @function.builtin)
|
||||||
|
|
||||||
(free_function_call
|
(free_function_call
|
||||||
(identifier) @function.call)
|
(identifier) @function.call)
|
||||||
|
|
||||||
|
|
@ -168,10 +172,12 @@
|
||||||
|
|
||||||
[
|
[
|
||||||
(address_literal)
|
(address_literal)
|
||||||
(affine_group_literal)
|
((affine_group_literal) (#set! "priority" 101))
|
||||||
(field_literal)
|
(field_literal)
|
||||||
(product_group_literal)
|
(product_group_literal)
|
||||||
(scalar_literal)
|
(scalar_literal)
|
||||||
(signed_literal)
|
(signed_literal)
|
||||||
(unsigned_literal)
|
(unsigned_literal)
|
||||||
] @number
|
] @number
|
||||||
|
|
||||||
|
(annotation) @attribute
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue