@teacss/language-service
v0.5.2
Published
Framework-agnostic editor intelligence for TeaCSS (completion, hover, color, token highlighting).
Readme
@teacss/language-service
Transport-neutral TeaCSS editor intelligence.
Use it for an in-process editor, playground, or tool. It returns
vscode-languageserver-types data and does not own an LSP connection.
import { TeacssLanguageService } from "@teacss/language-service";
const service = new TeacssLanguageService({ rootPath: process.cwd() });
await service.ready;
await service.getHover(document, { line: 0, character: 13 });
await service.getSemanticTokens(document);
await service.getClassNameEdits(document);
service.contextManager.releaseDocument(filePath);The service provides completion, hover, colors, references, diagnostics, Quick
Fixes, semantic tokens, and canonical class edits. References use the active
entry's @source graph. Class edits preserve unknown classes.
Use contextManager.setRoots(roots) to replace workspace roots; [] unloads
all contexts. Release a document or call reload() when a nearer entry becomes
available after the document was cached.
@teacss/language-server adds LSP transport and watchers.
@teacss/vscode provides the ready-made VS Code extension.
Pre-1.0. Results follow the active CSS entry.
