mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 19:00:02 -04:00
Better differentiate 'keywords'
This commit is contained in:
parent
b9d662cf89
commit
dcf20b8a23
1 changed files with 9 additions and 1 deletions
|
|
@ -68,7 +68,7 @@
|
||||||
[
|
[
|
||||||
(template_interpolation_start) ; ${
|
(template_interpolation_start) ; ${
|
||||||
(template_interpolation_end) ; }
|
(template_interpolation_end) ; }
|
||||||
] @punctuation.bracket
|
] @punctuation.special
|
||||||
)
|
)
|
||||||
|
|
||||||
(numeric_lit) @number
|
(numeric_lit) @number
|
||||||
|
|
@ -86,4 +86,12 @@
|
||||||
; highlight identifier keys as though they were block attributes
|
; highlight identifier keys as though they were block attributes
|
||||||
(object_elem key: (expression (variable_expr (identifier) @field)))
|
(object_elem key: (expression (variable_expr (identifier) @field)))
|
||||||
|
|
||||||
|
(variable_expr (identifier) @variable.builtin (#any-of? @variable.builtin "var" "local"))
|
||||||
|
((identifier) @keyword (#any-of? @keyword "module" "resource" "variable" "data" "locals" "terraform" "provider" "output"))
|
||||||
|
((identifier) @type.builtin (#any-of? @type.builtin "bool" "string" "number" "object" "tuple" "list" "map" "set" "any"))
|
||||||
|
|
||||||
|
(object_elem val: (expression
|
||||||
|
(variable_expr
|
||||||
|
(identifier) @type.builtin (#any-of? @type.builtin "bool" "string" "number" "object" "tuple" "list" "map" "set" "any"))))
|
||||||
|
|
||||||
(ERROR) @error
|
(ERROR) @error
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue