diff --git a/packages/svelte-vscode/syntaxes/svelte.tmLanguage.src.yaml b/packages/svelte-vscode/syntaxes/svelte.tmLanguage.src.yaml index 62cf699a7..ec56b84df 100644 --- a/packages/svelte-vscode/syntaxes/svelte.tmLanguage.src.yaml +++ b/packages/svelte-vscode/syntaxes/svelte.tmLanguage.src.yaml @@ -93,11 +93,11 @@ injections: patterns: # Matches the store accessor symbol. # i.e. the `$` in `$myStore`. - - match: (? +import './$types'; +import '$lib/foo'; +$bar; + + +{$bar} diff --git a/packages/svelte-vscode/test/grammar/samples/store/input.svelte.snap b/packages/svelte-vscode/test/grammar/samples/store/input.svelte.snap new file mode 100644 index 000000000..b7611c7a8 --- /dev/null +++ b/packages/svelte-vscode/test/grammar/samples/store/input.svelte.snap @@ -0,0 +1,22 @@ +> +#^^ source.svelte meta.script.svelte meta.tag.end.svelte punctuation.definition.tag.begin.svelte +# ^^^^^^ source.svelte meta.script.svelte meta.tag.end.svelte entity.name.tag.svelte +# ^ source.svelte meta.script.svelte meta.tag.end.svelte punctuation.definition.tag.end.svelte +> +>{$bar} +#^ source.svelte punctuation.section.embedded.begin.svelte +# ^ source.svelte meta.embedded.expression.svelte source.ts punctuation.definition.variable.svelte +# ^^^ source.svelte meta.embedded.expression.svelte source.ts +# ^ source.svelte punctuation.section.embedded.end.svelte +> \ No newline at end of file