tcmts.cli.lsp

Types

DocState type
Json type
LspTools type
What the language server needs from the CLI (passed in, so this module doesn't import the CLI's entry).
Message type
Position type
Row type

Server

connect (input: ReadableStream, output: WritableStream, onMessage: (m: Message) => void) => (m: Json) => vo…
Content-Length framed JSON-RPC over a pair of streams.
plain (s: string) => string
serveLsp (findCodebase: (dir: string) => Codebase, tools: LspTools) => void

Shared

lines (text: string) => { pos: (offset: number) => Position; offset: (p: Position) => number; lineEnd: (l…
Offsets ↔ LSP positions (both count UTF-16 code units, as JS strings do).