mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 02:40:09 -04:00
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
}
```
7 lines
180 B
Scheme
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?
|