mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 19:46:58 -04:00
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
}
```
This commit is contained in:
parent
f0e710793f
commit
aac4f027c5
1 changed files with 6 additions and 0 deletions
|
|
@ -1 +1,7 @@
|
|||
(comment) @comment
|
||||
|
||||
(heredoc_template
|
||||
(template_literal) @content
|
||||
(heredoc_identifier) @language
|
||||
(#set! "language" @language)
|
||||
(#downcase! "language"))aint that what we do?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue