diff options
| -rw-r--r-- | lockfile.json | 2 | ||||
| -rw-r--r-- | queries/hcl/highlights.scm | 21 |
2 files changed, 15 insertions, 8 deletions
diff --git a/lockfile.json b/lockfile.json index ccb840f7b..9047c3499 100644 --- a/lockfile.json +++ b/lockfile.json @@ -78,7 +78,7 @@ "revision": "a0c1adb59e390f7d839a146c57fdb33d36ed97e6" }, "hcl": { - "revision": "30e9f3eae8ec798f6540b05e3b4bb6c6e1313156" + "revision": "88c7c031d1b1d9c5a6fa0ef1739f3bc17ffceafe" }, "html": { "revision": "d93af487cc75120c89257195e6be46c999c6ba18" diff --git a/queries/hcl/highlights.scm b/queries/hcl/highlights.scm index f68137c42..889f1ab50 100644 --- a/queries/hcl/highlights.scm +++ b/queries/hcl/highlights.scm @@ -54,18 +54,20 @@ ] @conditional [ - (string_lit) - (quoted_template) - (heredoc_template) + (quoted_template_start) ; " + (quoted_template_end); " + (template_literal) ; non-interpolation/directive content ] @string - [ - (heredoc_identifier) - (heredoc_start) + (heredoc_identifier) ; <<END + (heredoc_start) ; END ] @punctuation.delimiter -(template_interpolation) @string.escape +[ + (template_interpolation_start) ; ${ + (template_interpolation_end) ; } +] @string.escape (numeric_lit) @number (bool_lit) @boolean @@ -77,4 +79,9 @@ (function_call (identifier) @function) (attribute (identifier) @field) +; { key: val } +; +; highlight identifier keys as though they were block attributes +(object_elem key: (expression (variable_expr (identifier) @field))) + (ERROR) @error |
