aboutsummaryrefslogtreecommitdiffstats
path: root/queries/hcl
diff options
context:
space:
mode:
authorRoberto Pommella Alegro <robertoaall@gmail.com>2022-07-08 15:29:03 -0300
committerStephan Seitz <stephan.seitz@fau.de>2022-07-08 21:58:42 +0200
commitaac4f027c590f95015e2a660338b313cc87d3816 (patch)
tree5e85de8ca3d1ce799cca28e41075a46b74a2039e /queries/hcl
parentsupport the fold of haskell (diff)
downloadnvim-treesitter-aac4f027c590f95015e2a660338b313cc87d3816.tar
nvim-treesitter-aac4f027c590f95015e2a660338b313cc87d3816.tar.gz
nvim-treesitter-aac4f027c590f95015e2a660338b313cc87d3816.tar.bz2
nvim-treesitter-aac4f027c590f95015e2a660338b313cc87d3816.tar.lz
nvim-treesitter-aac4f027c590f95015e2a660338b313cc87d3816.tar.xz
nvim-treesitter-aac4f027c590f95015e2a660338b313cc87d3816.tar.zst
nvim-treesitter-aac4f027c590f95015e2a660338b313cc87d3816.zip
Add heredoc language injection for HCL
Add a heredoc language injection similar to Ruby for HCL. This allows terraform resources like this to be properly highlighted ```hcl resource "aws_iam_role" "sample" { name = "sample" assume_role_policy = <<JSON { "Version": "2012-10-17", "Statement": [ { "Action": "sts:AssumeRole", "Principal": { "AWS": "*" }, "Effect": "Allow", "Sid": "" } ] } JSON } ```
Diffstat (limited to 'queries/hcl')
-rw-r--r--queries/hcl/injections.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/queries/hcl/injections.scm b/queries/hcl/injections.scm
index 4bb7d675d..00a9e5851 100644
--- a/queries/hcl/injections.scm
+++ b/queries/hcl/injections.scm
@@ -1 +1,7 @@
(comment) @comment
+
+(heredoc_template
+ (template_literal) @content
+ (heredoc_identifier) @language
+ (#set! "language" @language)
+ (#downcase! "language"))aint that what we do?