Say I want to make a snippet for:
/* valid svelte */
{#await promise}
{/await}
The XML will look like:
<!-- ST Snippet XML -->
<content><![CDATA[
{#await ${1:promise}}
$0
{/await}
]]></content>
But ST would take curly braces as a tab selection. So after few tabs it’s gone:
/* invalid svelte */
#await promise
{/await}
It loses necessary curly braces.
Plus that, this snippet wouldn’t appear automatically until I tab or ^
+ Space
. Is this normal?
Full snippet XML below:
<snippet>
<content><![CDATA[
{#await ${1:promise}}
$0
{/await}
]]></content>
<tabTrigger>await</tabTrigger>
<scope>text.html.svelte</scope>
<description>Svelte await</description>
</snippet>
by Pier Bover