Skip to content

Commit ac21417

Browse files
authored
Merge pull request #38 from patrickrgaffney/symbols
Add Symbol Indexing
2 parents 888006e + e944b12 commit ac21417

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

Symbols.tmPreferences

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>name</key>
6+
<string>Symbol List</string>
7+
<key>scope</key>
8+
<string>
9+
<!--
10+
Resource matches `resource` and `data` blocks. Block matches `provider`,
11+
`provisioner`, `variable`, `output`, `module`, and `atlas` blocks.
12+
-->
13+
meta.resource.terraform,
14+
meta.block.terraform
15+
</string>
16+
<key>settings</key>
17+
<dict>
18+
<key>showInSymbolList</key>
19+
<integer>1</integer>
20+
<key>showInIndexedSymbolList</key>
21+
<integer>1</integer>
22+
<key>symbolTransformation</key>
23+
<string>
24+
<!-- Removes trailing whitespace and opening bracket from symbol. -->
25+
<![CDATA[/\s*{$//]]>
26+
</string>
27+
</dict>
28+
</dict>
29+
</plist>

Terraform.sublime-syntax

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ contexts:
5050
7: string.terraform punctuation.definition.string.end.terraform
5151
8: punctuation.definition.tag.terraform
5252
- match: '(provider|provisioner|variable|output|module|atlas)\s+(")?([\w\-]+)(")?\s+({)'
53+
scope: meta.block.terraform
5354
captures:
5455
1: storage.type.function.terraform
5556
2: string.terraform punctuation.definition.string.begin.terraform

0 commit comments

Comments
 (0)