mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 19:46:58 -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_end) ; }
|
||||
] @punctuation.bracket
|
||||
] @punctuation.special
|
||||
)
|
||||
|
||||
(numeric_lit) @number
|
||||
|
|
@ -86,4 +86,12 @@
|
|||
; highlight identifier keys as though they were block attributes
|
||||
(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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue