Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Terraform Template language #6604

Merged
merged 14 commits into from
Dec 12, 2023
Merged
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -1160,6 +1160,9 @@
[submodule "vendor/grammars/swift-tmlanguage"]
path = vendor/grammars/swift-tmlanguage
url = https://github.com/jtbandes/swift-tmlanguage.git
[submodule "vendor/grammars/syntax"]
path = vendor/grammars/syntax
url = https://github.com/hashicorp/syntax.git
[submodule "vendor/grammars/tcl.tmbundle"]
path = vendor/grammars/tcl.tmbundle
url = https://github.com/textmate/tcl.tmbundle
Expand Down
4 changes: 4 additions & 0 deletions grammars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,10 @@ vendor/grammars/sweave.tmbundle:
- text.tex.latex.sweave
vendor/grammars/swift-tmlanguage:
- source.swift
vendor/grammars/syntax:
- source.hcl
- source.hcl.terraform
- source.sentinel
vendor/grammars/tcl.tmbundle:
- source.tcl
- text.html.tcl
Expand Down
11 changes: 11 additions & 0 deletions lib/linguist/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7061,6 +7061,17 @@ Terra:
interpreters:
- lua
language_id: 371
Terraform Template:
type: markup
extensions:
- ".tftpl"
color: "#7b42bb"
tm_scope: source.hcl.terraform
ace_mode: ruby
codemirror_mode: ruby
codemirror_mime_type: text/x-ruby
group: HCL
language_id: 856832701
Texinfo:
type: prose
wrap: true
Expand Down
11 changes: 11 additions & 0 deletions samples/Terraform Template/donors.tftpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": {
"stringValue": "${name}"
},
"email": {
"stringValue": "${email}"
},
"mailing_address": {
"stringValue": "${mailing_address}"
}
}
25 changes: 25 additions & 0 deletions samples/Terraform Template/policy.tftpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ${jsonencode(ec2_policies)},
"Resource": "*"
},
{
"Effect": "Allow",
"Action": ${jsonencode(s3_policies)},
"Resource": "*"
},
{
"Effect": "Allow",
"Action": ${jsonencode(lambda_policies)},
"Resource": "*"
},
{
"Effect": "Allow",
"Action": ${jsonencode(dynamodb_policies)},
"Resource": "*"
}
]
}
1 change: 1 addition & 0 deletions vendor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting
- **TeX:** [textmate/latex.tmbundle](https://github.com/textmate/latex.tmbundle)
- **Tea:** [pferruggiaro/sublime-tea](https://github.com/pferruggiaro/sublime-tea)
- **Terra:** [pyk/sublime-terra](https://github.com/pyk/sublime-terra)
- **Terraform Template:** [hashicorp/syntax](https://github.com/hashicorp/syntax)
- **Texinfo:** [Alhadis/language-texinfo](https://github.com/Alhadis/language-texinfo)
- **TextMate Properties:** [textmate/textmate.tmbundle](https://github.com/textmate/textmate.tmbundle)
- **Thrift:** [textmate/thrift.tmbundle](https://github.com/textmate/thrift.tmbundle)
Expand Down
1 change: 1 addition & 0 deletions vendor/grammars/syntax
Submodule syntax added at ced984
Loading
Loading