Skip to content

Commit

Permalink
Add Terraform Template language (#6604)
Browse files Browse the repository at this point in the history
* Inital branch commit; added Terraform Template

* removed sample w/ shell interpreter

* removed old swift grammar

* Update cached license

* Revert "Update cached license"

This reverts commit 98f05a0.

* Update grammar and license

* Update license

* Manually correct license

* Update module

---------

Co-authored-by: Colin Seymour <[email protected]>
Co-authored-by: Colin Seymour <[email protected]>
  • Loading branch information
3 people authored Dec 12, 2023
1 parent a45d988 commit 8c380f3
Show file tree
Hide file tree
Showing 8 changed files with 441 additions and 0 deletions.
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

0 comments on commit 8c380f3

Please sign in to comment.