diff --git a/Vue Component.sublime-syntax b/Vue Component.sublime-syntax index f377e4e..2e564c2 100644 --- a/Vue Component.sublime-syntax +++ b/Vue Component.sublime-syntax @@ -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 @@ -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 diff --git a/Vue Component.sublime-syntax.yaml-macros b/Vue Component.sublime-syntax.yaml-macros index 0a7c879..7e1b127 100644 --- a/Vue Component.sublime-syntax.yaml-macros +++ b/Vue Component.sublime-syntax.yaml-macros @@ -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 @@ -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