From 2cd5fce0aa458d860a700bb0fffd95a51883966d Mon Sep 17 00:00:00 2001 From: DeathAxe Date: Wed, 8 Sep 2021 21:04:18 +0200 Subject: [PATCH 01/21] Add section separators Improve readability. --- Vue Component.sublime-syntax | 8 ++++++++ Vue Component.sublime-syntax.yaml-macros | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/Vue Component.sublime-syntax b/Vue Component.sublime-syntax index 4ee8e79..88ce4df 100644 --- a/Vue Component.sublime-syntax +++ b/Vue Component.sublime-syntax @@ -81,6 +81,8 @@ contexts: 2: entity.name.tag.template.html push: template-mustache +###[ TAG ATTRIBUTES ]######################################################### + vue-directive: - match: (?=v-) push: @@ -117,6 +119,8 @@ contexts: 0: meta.string.html string.quoted.single.html punctuation.definition.string.end.html - include: else-pop +###[ STYLE TAG ]############################################################## + style-close-tag: # for compatibility with ST builds before 4114 - match: ( Date: Wed, 8 Sep 2021 21:05:31 +0200 Subject: [PATCH 02/21] Reorganize and group contexts in sections --- Vue Component.sublime-syntax | 32 ++++++++++++------------ Vue Component.sublime-syntax.yaml-macros | 32 ++++++++++++------------ 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/Vue Component.sublime-syntax b/Vue Component.sublime-syntax index 88ce4df..25a8760 100644 --- a/Vue Component.sublime-syntax +++ b/Vue Component.sublime-syntax @@ -69,20 +69,12 @@ contexts: - match: '' pop: true +###[ TAG ATTRIBUTES ]######################################################### + tag-attributes: - meta_prepend: true - include: vue-directive - template-tag: - - match: (<)((?i:template)){{tag_name_break}} - captures: - 0: meta.tag.template.begin.html - 1: punctuation.definition.tag.begin.html - 2: entity.name.tag.template.html - push: template-mustache - -###[ TAG ATTRIBUTES ]######################################################### - vue-directive: - match: (?=v-) push: @@ -453,12 +445,13 @@ contexts: ###[ TEMPLATE TAG ]########################################################### - template-common: - - include: template-lang-attribute - - include: tag-attributes - - match: /> - scope: punctuation.definition.tag.end.html - pop: true + template-tag: + - match: (<)((?i:template)){{tag_name_break}} + captures: + 0: meta.tag.template.begin.html + 1: punctuation.definition.tag.begin.html + 2: entity.name.tag.template.html + push: template-mustache template-close-tag: - match: () @@ -469,6 +462,13 @@ contexts: 3: punctuation.definition.tag.end.html pop: true + template-common: + - include: template-lang-attribute + - include: tag-attributes + - match: /> + scope: punctuation.definition.tag.end.html + pop: true + template-mustache: - meta_content_scope: meta.tag.template.begin.html - include: template-common diff --git a/Vue Component.sublime-syntax.yaml-macros b/Vue Component.sublime-syntax.yaml-macros index 418cfe2..6ac66dd 100644 --- a/Vue Component.sublime-syntax.yaml-macros +++ b/Vue Component.sublime-syntax.yaml-macros @@ -70,20 +70,12 @@ contexts: - match: '' pop: true +###[ TAG ATTRIBUTES ]######################################################### + tag-attributes: - meta_prepend: true - include: vue-directive - template-tag: - - match: (<)((?i:template)){{tag_name_break}} - captures: - 0: meta.tag.template.begin.html - 1: punctuation.definition.tag.begin.html - 2: entity.name.tag.template.html - push: template-mustache - -###[ TAG ATTRIBUTES ]######################################################### - vue-directive: - match: (?=v-) push: @@ -273,12 +265,13 @@ contexts: ###[ TEMPLATE TAG ]########################################################### - template-common: - - include: template-lang-attribute - - include: tag-attributes - - match: '/>' - scope: punctuation.definition.tag.end.html - pop: true + template-tag: + - match: (<)((?i:template)){{tag_name_break}} + captures: + 0: meta.tag.template.begin.html + 1: punctuation.definition.tag.begin.html + 2: entity.name.tag.template.html + push: template-mustache template-close-tag: - match: () @@ -289,6 +282,13 @@ contexts: 3: punctuation.definition.tag.end.html pop: true + template-common: + - include: template-lang-attribute + - include: tag-attributes + - match: '/>' + scope: punctuation.definition.tag.end.html + pop: true + template-mustache: - meta_content_scope: meta.tag.template.begin.html - include: template-common From bfb0a8326aa9b30eee65dc8404e68b3aa985a077 Mon Sep 17 00:00:00 2001 From: DeathAxe Date: Wed, 8 Sep 2021 21:20:21 +0200 Subject: [PATCH 03/21] Fix meta scopes of template tags This commit... 1. fixes duplicated meta.tag scopes in `