summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--queries/hcl/highlights.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/queries/hcl/highlights.scm b/queries/hcl/highlights.scm
index 0e70dee2..7cfb163a 100644
--- a/queries/hcl/highlights.scm
+++ b/queries/hcl/highlights.scm
@@ -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