Skip to content

Commit 6872473

Browse files
committed
chore: add snippets to create autofixers and stup functions
1 parent bf1a417 commit 6872473

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.vscode/mcp-snippets.code-snippets

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
// Place your svelte-mcp 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.
7+
// Placeholders with the same ids are connected.
8+
// Example:
9+
"Setup Function": {
10+
"scope": "javascript,typescript",
11+
"prefix": "!setup-mcp",
12+
"body": [
13+
"import type { SvelteMcp } from '../../index.js';",
14+
"import * as v from 'valibot';",
15+
"",
16+
"export function ${1:function_name}(server: SvelteMcp) {",
17+
"\t$0",
18+
"}",
19+
],
20+
"description": "Create a setup function for a tool/resource/prompt handler"
21+
},
22+
"Autofixer": {
23+
"scope": "javascript,typescript",
24+
"prefix": "!autofixer",
25+
"body": [
26+
"import type { Autofixer } from '.';",
27+
"export const ${1:autofixer_name}: Autofixer = {",
28+
"\t$0",
29+
"};",
30+
],
31+
"description": "Create a setup export for an autofixer"
32+
}
33+
}

0 commit comments

Comments
 (0)