nvim-treesitter/queries/hcl/injections.scm
Roberto Pommella Alegro aac4f027c5 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
}
```
2022-07-08 21:58:42 +02:00

7 lines
180 B
Scheme

(comment) @comment
(heredoc_template
(template_literal) @content
(heredoc_identifier) @language
(#set! "language" @language)
(#downcase! "language"))aint that what we do?