Skip to content

Commit bb825c9

Browse files
committed
Add some vs code svelte snippets
1 parent 7e221d6 commit bb825c9

File tree

1 file changed

+29
-8
lines changed

1 file changed

+29
-8
lines changed

.vscode/svelte.code-snippets

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
// Place your LexBox workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
3-
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
4-
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
5-
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
6-
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
2+
// Place your LexBox workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
3+
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
4+
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
5+
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
6+
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
77
// Placeholders with the same ids are connected.
88
// Example:
99
// "Print to console": {
@@ -14,17 +14,38 @@
1414
// "$2"
1515
// ],
1616
// "description": "Log output to console"
17-
// }
17+
// },
18+
"Svelte component script": {
19+
"scope": "svelte",
20+
"prefix": "script-module",
21+
"body": [
22+
"<script lang=\"ts\" module>",
23+
"\t$0",
24+
"</script>",
25+
],
26+
"description": "Log output to console"
27+
},
28+
"Svelte module script": {
29+
"scope": "svelte",
30+
"prefix": "script-component",
31+
"body": [
32+
"<script lang=\"ts\">",
33+
"\t$0",
34+
"</script>",
35+
],
36+
"description": "Log output to console"
37+
},
1838
"Svelte file": {
1939
"scope": "svelte",
40+
"prefix": "component",
2041
"isFileTemplate": true,
2142
"body": [
2243
"<script lang=\"ts\">",
2344
"</script>",
2445
"<div>",
25-
"$0",
46+
"\t$0",
2647
"</div>"
2748
],
2849
"description": "Empty Svelte file"
2950
}
30-
}
51+
}

0 commit comments

Comments
 (0)