Hi there! I was trying to polish the syntax declaration for the Vue extension and I encountered a possible bug with template-scopes.
The syntax is composed by a main one which defines all the template, script and style blocks and a subsyntax (VueHTML) for all the special Vue directives used in the template. I was looking at using the template-scopes for extending the base HTML with these directives but I found out that since VueHTML is used as a subsyntax the template-scopes aren’t applied.
When I use the subsyntax as a “main” syntax everything works fine.
When I use it in the actual main syntax it doesn’t work.
The declaration of the template block:
<scope name="vue.tag.open.paired.template" spell-check="false" lookup="documentation">
<starts-with>
<expression>(?=<(?i:template)\b)(?![^\/>]*\/>\\s*$)</expression>
</starts-with>
<ends-with />
<subscopes anchored="true" skip-whitespace="false">
<scope name="vue.tag.template.open">
<symbol type="tag-style">
<context behavior="start" group-by-name="true">
<auto-close string="</" completion="${name}>" />
</context>
</symbol>
<starts-with>
<expression><((?i:template))</expression>
<capture number="1" name="vue.tag.name" />
</starts-with>
<ends-with>
<expression>/?></expression>
</ends-with>
<subscopes>
<include syntax="vue-html" collection="vue-directives" />
<include syntax="html" collection="attributes" />
</subscopes>
</scope>
<scope name="vue.embedded.block.template.content">
<starts-with>
<expression>(?<=>)</expression>
</starts-with>
<ends-with>
<expression>^(?=</(?i:template)\b)</expression>
</ends-with>
<subsyntax name="vue-html" noncontiguous="true" export-symbols="true">
<cut-off>
<expression>^(?=</(?i:template)\b)</expression>
</cut-off>
</subsyntax>
</scope>
</subscopes>
</scope>
Is this an inteded behaviour? What can I do about it? Right now to achieve this result I basically have to redeclare the entire HTML syntax… Not the best.
Thanks