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

Separate HCL syntax into its own file #56

Merged
merged 4 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Comments.tmPreferences
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>name</key>
<string>Comments</string>
<key>scope</key>
<string>source.terraform, source.terraform-vars</string>
<string>source.terraform, source.terraform-vars, source.terraform-hcl</string>
<key>settings</key>
<dict>
<key>shellVariables</key>
Expand Down
4 changes: 4 additions & 0 deletions Terraform-hcl.sublime-settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"tab_size": 2,
"translate_tabs_to_spaces": true
}
28 changes: 28 additions & 0 deletions Terraform-hcl.sublime-syntax
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
%YAML 1.2
#
# This syntax definition is based on the Terraform guide:
# https://www.terraform.io/docs/configuration/index.html
#
# As well as the HCL Native Syntax Spec:
# https://github.com/hashicorp/hcl2/blob/master/hcl/hclsyntax/spec.md
#
# For documentation on the .subline-syntax format:
# https://www.sublimetext.com/docs/syntax.html
#
# Regex's in this file support the Oniguruma regex engine:
# https://raw.githubusercontent.com/kkos/oniguruma/5.9.6/doc/RE
#
---
name: Terraform (HCL)
rchl marked this conversation as resolved.
Show resolved Hide resolved

# File Extensions:
#
# - ".hcl": non-terraform tools often use this HCL syntax, i.e. Vault
# https://www.vaultproject.io/docs/configuration/
file_extensions:
- hcl
scope: source.terraform-hcl

contexts:
main:
- include: scope:source.terraform
4 changes: 0 additions & 4 deletions Terraform.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@ name: Terraform
#
# - ".tf": the standard file extension
# https://www.terraform.io/docs/language/index.html
#
# - ".hcl": non-terraform tools often use this HCL syntax, i.e. Vault
# https://www.vaultproject.io/docs/configuration/
file_extensions:
- tf
- hcl
scope: source.terraform

variables:
Expand Down
Loading