From 10a6f619733ca8ed459b4347328503113ecd8c67 Mon Sep 17 00:00:00 2001 From: shnhrrsn Date: Fri, 8 Sep 2017 23:45:52 -0400 Subject: [PATCH] Added symbol list settings --- Preferences/Symbol List Banned.tmPreferences | 18 +++++++++++ .../Symbol List Sections.tmPreferences | 22 ++++++++++++++ grind-stone.sublime-syntax | 30 ++++++++++++------- 3 files changed, 59 insertions(+), 11 deletions(-) create mode 100644 Preferences/Symbol List Banned.tmPreferences create mode 100644 Preferences/Symbol List Sections.tmPreferences diff --git a/Preferences/Symbol List Banned.tmPreferences b/Preferences/Symbol List Banned.tmPreferences new file mode 100644 index 0000000..d0fc011 --- /dev/null +++ b/Preferences/Symbol List Banned.tmPreferences @@ -0,0 +1,18 @@ + + + + name + Symbol List Banned + scope + source.stone meta.tag, source.stone meta.function-call + settings + + showInSymbolList + 0 + showInIndexedSymbolList + 0 + + uuid + 7A25463F-0B09-48E4-AE23-A63CF9E2F3F4 + + diff --git a/Preferences/Symbol List Sections.tmPreferences b/Preferences/Symbol List Sections.tmPreferences new file mode 100644 index 0000000..8f7b4b2 --- /dev/null +++ b/Preferences/Symbol List Sections.tmPreferences @@ -0,0 +1,22 @@ + + + + name + Symbol List Sections + scope + source.stone meta.stone.symbol + settings + + showInSymbolList + 1 + symbolTransformation + + s/,.+?\)/\)/g; + s/^\s+//g; + + + + uuid + ABCDAB55-1990-4658-A74B-2AEFA445D7AA + + diff --git a/grind-stone.sublime-syntax b/grind-stone.sublime-syntax index 4974bbd..dc4a7fc 100644 --- a/grind-stone.sublime-syntax +++ b/grind-stone.sublime-syntax @@ -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 @@ -73,11 +78,7 @@ 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 @@ -85,3 +86,10 @@ contexts: 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'