Skip to content

Commit d64fd16

Browse files
author
Margus Kerma
committed
Add support for double slash comments
According to https://github.com/hashicorp/hcl/blob/master/README.md single line comments can also start with `//`
1 parent 82ee13f commit d64fd16

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

Comments.tmPreferences

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
<key>value</key>
2929
<string>*/</string>
3030
</dict>
31+
<dict>
32+
<key>name</key>
33+
<string>TM_COMMENT_START_3</string>
34+
<key>value</key>
35+
<string>// </string>
36+
</dict>
3137
</array>
3238
</dict>
3339
<key>uuid</key>

Terraform.YAML-tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ uuid: 9060ca81-906d-4f19-a91a-159f4eb119d6
77
patterns:
88
- comment: Comments
99
name: comment.line.number-sign.terraform
10-
begin: '#'
10+
begin: '#|//'
1111
end: $\n?
1212
captures:
1313
'0': {name: punctuation.definition.comment.terraform}

Terraform.tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<array>
1414
<dict>
1515
<key>begin</key>
16-
<string>#</string>
16+
<string>#|//</string>
1717
<key>captures</key>
1818
<dict>
1919
<key>0</key>

0 commit comments

Comments
 (0)