Skip to content

Commit

Permalink
Separate HCL syntax into its own file
Browse files Browse the repository at this point in the history
  • Loading branch information
rchl committed Jan 17, 2024
1 parent 7faec10 commit 4c1eedb
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
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)

# 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

0 comments on commit 4c1eedb

Please sign in to comment.