Better differentiate 'keywords'

This commit is contained in:
Ronnie Magatti 2021-07-04 15:32:26 -06:00 committed by Stephan Seitz
parent b9d662cf89
commit dcf20b8a23

View file

@ -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