Skip to content

Commit d071ff7

Browse files
committed
Folding
1 parent 80df3a0 commit d071ff7

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Terraform.YAML-tmLanguage

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ patterns:
3333

3434
- name: meta.resource.terraform
3535
match: (resource|data)\s+(")?(\w+)(")?\s+(")?([\w-]+)(")?\s+({)
36+
foldingStartMarker: '\{\s*$'
37+
foldingStopMarker: '^\s*\}'
3638
captures:
3739
'1': {name: storage.type.function.terraform}
3840
'2': {name: string.terraform punctuation.definition.string.begin.terraform}
@@ -44,6 +46,8 @@ patterns:
4446
'8': {name: punctuation.definition.tag.terraform}
4547

4648
- match: (provider|provisioner|variable|output|module|atlas)\s+(")?([\w-]+)(")?\s+({)
49+
foldingStartMarker: '\{\s*$'
50+
foldingStopMarker: '^\s*\}'
4751
captures:
4852
'1': {name: storage.type.function.terraform}
4953
'2': {name: string.terraform punctuation.definition.string.begin.terraform}

Terraform.tmLanguage

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@
116116
<string>punctuation.definition.tag.terraform</string>
117117
</dict>
118118
</dict>
119+
<key>foldingStartMarker</key>
120+
<string>\{\s*$</string>
121+
<key>foldingStopMarker</key>
122+
<string>^\s*\}</string>
119123
<key>match</key>
120124
<string>(resource|data)\s+(")?(\w+)(")?\s+(")?([\w-]+)(")?\s+({)</string>
121125
<key>name</key>
@@ -150,6 +154,10 @@
150154
<string>punctuation.definition.tag.terraform</string>
151155
</dict>
152156
</dict>
157+
<key>foldingStartMarker</key>
158+
<string>\{\s*$</string>
159+
<key>foldingStopMarker</key>
160+
<string>^\s*\}</string>
153161
<key>match</key>
154162
<string>(provider|provisioner|variable|output|module|atlas)\s+(")?([\w-]+)(")?\s+({)</string>
155163
</dict>

0 commit comments

Comments
 (0)