Package APIs

@master/css-language-server

Master CSS Language Server

Public entrypoints

Provide Master CSS completion, hover, colors, formatting and semantic tokens through the Language Server Protocol. The library entry supports host-managed lifecycle; the server entry starts the process.

Declarations show the public surface of each import path. Referenced type names may be local to the package; import only names listed as exports here. Private implementation is omitted, while constructor restrictions remain visible.

@master/css-language-server

Language server, workspace settings and semantic-token request names.

ACTIVE_SEMANTIC_TOKENS_REQUEST

TypeScript
declare const ACTIVE_SEMANTIC_TOKENS_REQUEST: "masterCSS/renderActiveSemanticTokens";

defaultLanguageServerSettings

TypeScript
declare const defaultLanguageServerSettings: Readonly<MasterCSSLanguageServerSettings>;

DOCUMENT_SEMANTIC_TOKENS_REQUEST

TypeScript
declare const DOCUMENT_SEMANTIC_TOKENS_REQUEST: "masterCSS/renderDocumentSemanticTokens";

MasterCSSLanguageServer

Complete declaration · 42 lines
TypeScript
export declare class MasterCSSLanguageServer implements Disposable {    connection: Connection;    customSettings?: MasterCSSLanguageServerSettings | undefined;    workspaceFolders: WorkspaceFolder[];    workspaces: Map<string, MasterCSSWorkspace>;    globalWorkspace: MasterCSSWorkspace;    documents: TextDocuments<TextDocument>;    initializing?: Promise<void>;    clientCapabilities: ClientCapabilities;    settings?: MasterCSSLanguageServerSettings;    console: RemoteConsole;    constructor(      connection?: Connection,      customSettings?: MasterCSSLanguageServerSettings | undefined    );    start(): void;    init(): Promise<void>;    onInitialize(params: InitializeParams): InitializeResult;    onHover(params: HoverParams): Promise<Hover | undefined>;    onCompletion(params: CompletionParams): Promise<CompletionItem[] | undefined>;    onDocumentColor(params: DocumentColorParams): Promise<ColorInformation[]>;    onColorPresentation(params: ColorPresentationParams): Promise<ColorPresentation[]>;    onDocumentFormatting(params: DocumentFormattingParams): Promise<TextEdit[]>;    onDocumentRangeFormatting(      params: DocumentRangeFormattingParams    ): Promise<TextEdit[]>;    onSemanticTokens(params: SemanticTokensParams): Promise<SemanticTokens>;    onDocumentSemanticTokens(params: SemanticTokensParams): Promise<SemanticTokens>;    onActiveSemanticTokens(params: TextDocumentPositionParams): Promise<SemanticTokens>;    onDidOpen(params: TextDocumentChangeEvent<TextDocument>): Promise<void>;    onDidChangeContent(params: TextDocumentChangeEvent<TextDocument>): Promise<void>;    onDidClose(params: TextDocumentChangeEvent<TextDocument>): Promise<void>;    onDidSave(params: TextDocumentChangeEvent<TextDocument>): Promise<void>;    onDidChangeConfiguration(      { settings: changedSettings }: DidChangeConfigurationParams    ): Promise<void>;    initWorkspaceLanguageService(workspace: MasterCSSWorkspace): Promise<void>;    destroyLanguageService(workspace: MasterCSSWorkspace): void;    findClosestWorkspace(textDocumentURI: string): MasterCSSWorkspace;    dispose(): void;    [Symbol.dispose](): void;}

MasterCSSLanguageServerSettings

TypeScript
export type MasterCSSLanguageServerSettings = MasterCSSLanguageServiceSettings & {    workspaces?: readonly Pattern[] | 'auto';    verbose?: boolean;};

MasterCSSWorkspace

TypeScript
export declare interface MasterCSSWorkspace {    uri: string;    openedTextDocuments: TextDocument[];    languageService?: MasterCSSLanguageService;    languageServiceSettings: MasterCSSLanguageServerSettings;    baseManifest?: MasterCSSManifest;    manifestResolution?: MasterCSSWorkspacePackageResolution;    manifestSource?: 'workspace' | 'bundled';    manifestErrors?: unknown[];    planEntries?: string[];}

@master/css-language-server/server

Executable server startup entry; no named or default exports.

This entry has no named or default exports. Loading it runs its host entrypoint.

Using this contract

Create and start MasterCSSLanguageServer when embedding it in a host, then dispose it during shutdown. Loading the /server entry constructs and starts a server immediately. See Language Service for the editor-facing workflow.


© 2026 Aoyue Design LLC.MIT License
Trademark Policy