User Snippets for Svelte in VSCode
Solution 1:
The scope id for Svelte is probably svelte
lowercase. If you click on the Svelte
language id button in the lower right when you have a .svelte
file open, you can look through those language ids for svelte
- the correct version to use is that in the parentheses like
Svelte (svelte)
use the version in parentheses - svelte
lowercased
{
"test": {
"scope": "svelte",
"prefix": "xx",
"body": ["This is a simple test"],
"description": "Code snippet for testing"
}
}
Works fine in a .svelte
file.
You do not need to remove the scope selector but it is redundant if it is already inside the svelte.json
file which limits all snippets within it to that filetype.