karia-lsp
v0.0.3
Published
CSS language server for CSS Modules and CSS custom properties, backed by the karia Rust engine
Maintainers
Readme
karia-lsp
CSS language server for CSS Modules and CSS custom properties, backed by the karia-css Rust engine.
It combines Microsoft's vscode-css-languageservice (standard CSS completion,
hover, diagnostics) with a Rust index of workspace variables and class names,
and uses the Rust worker’s oxc parser to map CSS Module imports in JS/JSX/TS/TSX.
The worker keeps open source text by URI, including unsaved changes, and removes
it on close. Module-access queries use the URI and a UTF-16 cursor offset;
workspace-wide source scanning is not implemented.
Install
npm install -D karia-lspUsage
Launch over stdio from any LSP client:
karia-lsp --stdio
# or
node node_modules/karia-lsp/dist/server.js --stdioFeatures: hover/definition/completion for var(--token), class completion and
hover for styles.foo in TSX, and reflection of unsaved buffer edits.
For Zed, install the dev extension in
editors/zed;
it can resolve this package automatically.
Prototype boundaries
See the monorepo README — the
index is workspace-wide and does not model the import graph or the DOM
cascade; rename, find-references, and .d.ts generation are not implemented.
License
MIT
