mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix(kdl): highlight query order (#7688)
This just fixes the highlighting queries so everything isn't highlighted as a variable due to the order of the queries meaning several queries were ignored. I also changed the node names to be highlighted as `@tag` since KDL is an xml-like format so `@tag` seemed more appropriate than type and it differentiates it from the type annotations. This does NOT update to the latest KDL version 2, that would need grammar changes. It does "mostly" work with KDL 2 though (notably unquoted strings seem to throw the grammar off.).
This commit is contained in:
parent
00e797ea25
commit
28f76678ca
1 changed files with 8 additions and 7 deletions
|
|
@ -1,18 +1,19 @@
|
|||
; Types
|
||||
; Variables
|
||||
(identifier) @variable
|
||||
|
||||
; Nodes
|
||||
(node
|
||||
(identifier) @tag)
|
||||
|
||||
; Type annotation
|
||||
(type
|
||||
(identifier) @type)
|
||||
|
||||
(type) @type
|
||||
|
||||
(annotation_type) @type.builtin
|
||||
|
||||
; Properties
|
||||
(prop
|
||||
(identifier) @property)
|
||||
|
||||
; Variables
|
||||
(identifier) @variable
|
||||
|
||||
; Operators
|
||||
[
|
||||
"="
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue