A Claude Code plugin providing comprehensive Svelte development support through:
- svelte-language-server integration for IDE-like features
- Automated hooks for formatting, linting, and type checking
- Svelte ecosystem integration (svelte-check, ESLint, Prettier)
# Run the setup command (after installing the plugin)
/setupOr manually:
# Install svelte-language-server globally
npm install -g svelte-language-server
# Install development tools
npm install -D svelte-check prettier prettier-plugin-svelte eslint eslint-plugin-svelteThe plugin configures svelte-language-server for Claude Code via .lsp.json.
Capabilities:
- Go to definition / references
- Hover documentation
- Code completion
- TypeScript integration
- Real-time diagnostics
- Component prop validation
| Hook | Trigger | Description |
|---|---|---|
prettier-svelte |
**/*.svelte |
Code formatting with Prettier |
svelte-check |
**/*.svelte |
Type checking and validation |
eslint-svelte |
**/*.svelte |
Linting with ESLint |
svelte-todo-fixme |
**/*.svelte |
Surface TODO/FIXME comments |
| Tool | Installation | Purpose |
|---|---|---|
svelte-language-server |
npm install -g svelte-language-server |
LSP server |
svelte-check |
npm install -D svelte-check |
Type checking |
prettier |
npm install -D prettier prettier-plugin-svelte |
Formatting |
eslint |
npm install -D eslint eslint-plugin-svelte |
Linting |
Create a Prettier configuration for Svelte:
{
"plugins": ["prettier-plugin-svelte"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}Configure ESLint for Svelte:
{
"extends": ["eslint:recommended", "plugin:svelte/recommended"],
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"env": {
"browser": true,
"es2017": true,
"node": true
}
}svelte-lsp/
├── .claude-plugin/
│ └── plugin.json # Plugin metadata
├── .lsp.json # svelte-language-server configuration
├── commands/
│ └── setup.md # /setup command
├── hooks/
│ └── hooks.json # Automated hooks
├── tests/
│ └── Sample.svelte # Sample component for testing
├── CLAUDE.md # Project instructions
└── README.md # This file
- Ensure
.sveltefiles exist in project - Verify installation:
which svelte-language-server - Check LSP config:
cat .lsp.json - Ensure Node.js is installed:
node --version
Initialize TypeScript configuration:
npm install -D typescript
npx svelte-check --init- Verify prettier-plugin-svelte is installed
- Check
.prettierrcconfiguration exists - Run manually:
npx prettier --write "**/*.svelte"
Initialize ESLint:
npm init @eslint/config
npm install -D eslint-plugin-svelte- Verify hooks are loaded:
cat hooks/hooks.json - Check file patterns match your structure
- Ensure required tools are in node_modules
MIT