@chasket/chasket-lsp
v0.2.2
Published
Language Server Protocol implementation for Chasket
Maintainers
Readme
@chasket/chasket-lsp
Part of the Chasket ecosystem.
Language Server Protocol implementation for Chasket. Provides diagnostics, completions, hover, go-to-definition, and formatting for .csk files in any LSP-compatible editor.
Zero dependencies.
Installation
npm install @chasket/chasket-lspUsage
stdio mode (default)
npx chasket-lsp --stdioFrom Node.js
const { createServer } = require('@chasket/chasket-lsp');
const server = createServer(process.stdin, process.stdout);
server.start();Editor setup
VSCode
Install the chasket-vscode extension. It automatically starts the LSP server when available.
Neovim (nvim-lspconfig)
local lspconfig = require('lspconfig')
local configs = require('lspconfig.configs')
configs.csk = {
default_config = {
cmd = { 'npx', 'chasket-lsp', '--stdio' },
filetypes = { 'chasket' },
root_dir = lspconfig.util.root_pattern('chasket.config.json', 'package.json'),
},
}
lspconfig.csk.setup {}Sublime Text (LSP package)
{
"clients": {
"chasket": {
"command": ["npx", "chasket-lsp", "--stdio"],
"selector": "source.chasket"
}
}
}Capabilities
| Feature | Description |
|---------|-------------|
| Diagnostics | Real-time error and warning reporting |
| Completions | State, prop, computed, and method suggestions |
| Hover | Type info and documentation on hover |
| Go to definition | Jump to symbol definitions within .csk files |
| Formatting | Auto-format .csk files |
| Document symbols | Outline view of components |
Part of the Chasket ecosystem
This package is part of Chasket, a template-first Web Component compiler.
