Skip to content

Commit

Permalink
Added symbol list settings
Browse files Browse the repository at this point in the history
  • Loading branch information
shnhrrsn committed Sep 9, 2017
1 parent c6ddfdb commit 10a6f61
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 11 deletions.
18 changes: 18 additions & 0 deletions Preferences/Symbol List Banned.tmPreferences
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>name</key>
<string>Symbol List Banned</string>
<key>scope</key>
<string>source.stone meta.tag, source.stone meta.function-call</string>
<key>settings</key>
<dict>
<key>showInSymbolList</key>
<integer>0</integer>
<key>showInIndexedSymbolList</key>
<integer>0</integer>
</dict>
<key>uuid</key>
<string>7A25463F-0B09-48E4-AE23-A63CF9E2F3F4</string>
</dict>
</plist>
22 changes: 22 additions & 0 deletions Preferences/Symbol List Sections.tmPreferences
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>name</key>
<string>Symbol List Sections</string>
<key>scope</key>
<string>source.stone meta.stone.symbol</string>
<key>settings</key>
<dict>
<key>showInSymbolList</key>
<integer>1</integer>
<key>symbolTransformation</key>
<string>
s/,.+?\)/\)/g;
s/^\s+//g;
<!-- s/@(.+?)\((?:['"])(.+?)(?:['"])\)/$1 $2/g; -->
</string>
</dict>
<key>uuid</key>
<string>ABCDAB55-1990-4658-A74B-2AEFA445D7AA</string>
</dict>
</plist>
30 changes: 19 additions & 11 deletions grind-stone.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,22 @@ contexts:
1: punctuation.section.embedded.ignore.end.stone
pop: true

- match: '(\s{0}|^)(\@)\b(asset|babel|block|break|coffee|component|continue|css|debug|dump|each|elseif|extends|for|foreach|forelse|hasSection|if|include|js|layout|less|macro|push|sass|scss|script|section|set|slot|stack|styl|style|stylus|unless|while|yield)\b(?=(|\s*|)\()'
- match: '(\s{0}|^)(\@)\b(component|section|slot|yield)\b(?=(|\s*|)\()'
captures:
0: punctuation.section.embedded.js
2: keyword.control.flow.js
3: keyword.control.flow.js
push:
- meta_scope: custom.compiler.stone.js
- meta_content_scope: source.js.stone
- match: '(?<=\))'
pop: true
- include: 'scope:source.js'
- meta_scope: meta.stone.symbol.js
- include: directive_args

- match: '(\s{0}|^)(\@)\b(asset|babel|block|break|coffee|continue|css|debug|dump|each|elseif|extends|for|foreach|forelse|hasSection|if|include|js|layout|less|macro|push|sass|scss|script|set|stack|styl|style|stylus|unless|while)\b(?=(|\s*|)\()'
captures:
0: punctuation.section.embedded.js
2: keyword.control.flow.js
3: keyword.control.flow.js
push:
- include: directive_args

- match: '(\s{0}|^)(\@)\b(break|continue|else|empty|endblock|endcomponent|endfor|endforeach|endforelse|endif|endmacro|endpush|endsection|endslot|endspaceless|endunless|endwhile|parent|setup|show|spaceless|super)\b'
scope: custom.compiler.stone.js
Expand All @@ -73,15 +78,18 @@ contexts:
0: support.function
2: constant.other.inline-data.html
push:
- meta_scope: custom.compiler.stone.js
- meta_content_scope: source.js.stone
- match: '(?<=\))'
pop: true
- include: 'scope:source.js'
- include: directive_args

- match: '(\s{0}|^)(\@)\b([a-zA-Z_]+)\b(\s?)\b'
scope: custom.compiler.stone.js
captures:
0: support.function
2: constant.other.inline-data.html
pop: false

directive_args:
- meta_scope: custom.compiler.stone.js
- meta_content_scope: source.js.stone
- match: '(?<=\))'
pop: true
- include: 'scope:source.js'

0 comments on commit 10a6f61

Please sign in to comment.