diff --git a/Terraform-hcl.sublime-settings b/Terraform-hcl.sublime-settings new file mode 100644 index 0000000..8bbee60 --- /dev/null +++ b/Terraform-hcl.sublime-settings @@ -0,0 +1,4 @@ +{ + "tab_size": 2, + "translate_tabs_to_spaces": true +} diff --git a/Terraform-hcl.sublime-syntax b/Terraform-hcl.sublime-syntax new file mode 100644 index 0000000..d61d643 --- /dev/null +++ b/Terraform-hcl.sublime-syntax @@ -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 diff --git a/Terraform.sublime-syntax b/Terraform.sublime-syntax index a5624f5..7717623 100644 --- a/Terraform.sublime-syntax +++ b/Terraform.sublime-syntax @@ -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: