Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scope improvements #168

Merged
merged 2 commits into from
Nov 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions Vue Component.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -639,12 +639,18 @@ contexts:
- include: tag-event-attribute
- include: tag-generic-attribute
mustache-expression:
- match: '{{'
scope: punctuation.definition.template.begin.html
embed: scope:source.js
escape: '}}'
escape_captures:
0: punctuation.definition.template.end.html
- match: (?={{)
set:
- meta_scope: meta.template.vue
- match: '{{'
scope: punctuation.definition.template.begin.html
embed: scope:source.js
embed_scope: source.js.embedded.vue
escape: '}}'
escape_captures:
0: meta.template.vue punctuation.definition.template.end.html
- match: ''
pop: true

template-tag:
- match: (<)((?i:template))\b
Expand Down Expand Up @@ -674,12 +680,14 @@ contexts:
- match: '"'
scope: punctuation.definition.string.begin.html
embed: scope:source.js
embed_scope: source.js.embedded.vue
escape: '"'
escape_captures:
0: punctuation.definition.string.end.html
- match: "'"
scope: punctuation.definition.string.begin.html
embed: scope:source.js
embed_scope: source.js.embedded.vue
escape: "'"
escape_captures:
0: punctuation.definition.string.end.html
Expand Down
20 changes: 14 additions & 6 deletions Vue Component.sublime-syntax.yaml-macros
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@ contexts: !merge
- include: mustache-expression

mustache-expression:
- match: '{{'
scope: punctuation.definition.template.begin.html
embed: scope:source.js
escape: '}}'
escape_captures:
0: punctuation.definition.template.end.html
- match: '(?={{)'
set:
- meta_scope: meta.template.vue
- match: '{{'
scope: punctuation.definition.template.begin.html
embed: scope:source.js
embed_scope: source.js.embedded.vue
escape: '}}'
escape_captures:
0: meta.template.vue punctuation.definition.template.end.html
- match: ''
pop: true

tag-attributes: !prepend
- include: vue-directive
Expand Down Expand Up @@ -52,12 +58,14 @@ contexts: !merge
- match: '"'
scope: punctuation.definition.string.begin.html
embed: scope:source.js
embed_scope: source.js.embedded.vue
escape: '"'
escape_captures:
0: punctuation.definition.string.end.html
- match: "'"
scope: punctuation.definition.string.begin.html
embed: scope:source.js
embed_scope: source.js.embedded.vue
escape: "'"
escape_captures:
0: punctuation.definition.string.end.html
Expand Down