Skip to content

Commit

Permalink
Merge pull request #56 from rchl/feat/hcl
Browse files Browse the repository at this point in the history
Separate HCL syntax into its own file
  • Loading branch information
radeksimko authored Jan 18, 2024
2 parents 3ef5bfb + eeaeff3 commit 7ebc850
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 5 deletions.
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.hcl</string>
<key>settings</key>
<dict>
<key>shellVariables</key>
Expand Down
4 changes: 4 additions & 0 deletions 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 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: HCL

# 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.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

0 comments on commit 7ebc850

Please sign in to comment.