mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 02:10:15 -04:00
add type def highlight, add field declaration highlight and remove constant highlight
This commit is contained in:
parent
559f2e7568
commit
eb3f263bfe
1 changed files with 2 additions and 3 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
; Identifiers
|
; Identifiers
|
||||||
|
|
||||||
(type_identifier) @type
|
(type_identifier) @type
|
||||||
|
(type_spec name: (type_identifier) @type.definition)
|
||||||
(field_identifier) @property
|
(field_identifier) @property
|
||||||
(identifier) @variable
|
(identifier) @variable
|
||||||
(package_identifier) @namespace
|
(package_identifier) @namespace
|
||||||
|
|
@ -15,9 +16,6 @@
|
||||||
((identifier) @constant
|
((identifier) @constant
|
||||||
(#eq? @constant "_"))
|
(#eq? @constant "_"))
|
||||||
|
|
||||||
((identifier) @constant
|
|
||||||
(#vim-match? @constant "^[A-Z][A-Z\\d_]+$"))
|
|
||||||
|
|
||||||
(const_spec
|
(const_spec
|
||||||
name: (identifier) @constant)
|
name: (identifier) @constant)
|
||||||
|
|
||||||
|
|
@ -201,6 +199,7 @@
|
||||||
|
|
||||||
(keyed_element
|
(keyed_element
|
||||||
. (literal_element (identifier) @field))
|
. (literal_element (identifier) @field))
|
||||||
|
(field_declaration name: (field_identifier) @field)
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue