Skip to content

Commit 7ebc850

Browse files
authored
Merge pull request #56 from rchl/feat/hcl
Separate HCL syntax into its own file
2 parents 3ef5bfb + eeaeff3 commit 7ebc850

File tree

4 files changed

+33
-5
lines changed

4 files changed

+33
-5
lines changed

Comments.tmPreferences

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<key>name</key>
66
<string>Comments</string>
77
<key>scope</key>
8-
<string>source.terraform, source.terraform-vars</string>
8+
<string>source.terraform, source.terraform-vars, source.hcl</string>
99
<key>settings</key>
1010
<dict>
1111
<key>shellVariables</key>

HCL.sublime-settings

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"tab_size": 2,
3+
"translate_tabs_to_spaces": true
4+
}

HCL.sublime-syntax

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
%YAML 1.2
2+
#
3+
# This syntax definition is based on the Terraform guide:
4+
# https://www.terraform.io/docs/configuration/index.html
5+
#
6+
# As well as the HCL Native Syntax Spec:
7+
# https://github.com/hashicorp/hcl2/blob/master/hcl/hclsyntax/spec.md
8+
#
9+
# For documentation on the .subline-syntax format:
10+
# https://www.sublimetext.com/docs/syntax.html
11+
#
12+
# Regex's in this file support the Oniguruma regex engine:
13+
# https://raw.githubusercontent.com/kkos/oniguruma/5.9.6/doc/RE
14+
#
15+
---
16+
name: HCL
17+
18+
# File Extensions:
19+
#
20+
# - ".hcl": non-terraform tools often use this HCL syntax, i.e. Vault
21+
# https://www.vaultproject.io/docs/configuration/
22+
file_extensions:
23+
- hcl
24+
scope: source.hcl
25+
26+
contexts:
27+
main:
28+
- include: scope:source.terraform

Terraform.sublime-syntax

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,8 @@ name: Terraform
1919
#
2020
# - ".tf": the standard file extension
2121
# https://www.terraform.io/docs/language/index.html
22-
#
23-
# - ".hcl": non-terraform tools often use this HCL syntax, i.e. Vault
24-
# https://www.vaultproject.io/docs/configuration/
2522
file_extensions:
2623
- tf
27-
- hcl
2824
scope: source.terraform
2925

3026
variables:

0 commit comments

Comments
 (0)