Shared Go packages for building LSP servers — the plumbing you'd rather not rewrite every time you start a new language server.
Extracted from sqlite-lsp once it became clear that the infrastructure bits were going to get copied verbatim into the next project (and the one after that).
logging— Structured JSON logging with file rotation. Writes to{UserCacheDir}/{appName}/{appName}.log, rotates at 5 MB, falls back to stderr if things go sideways.pathutil— Converts betweenfile://URIs and OS file paths. Handles the Windows drive-letter dance so you don't have to.position— Byte offset to line/column conversion and back. The kind of thing that's trivial until you get it wrong and every diagnostic points at the wrong line.transport— LSP message framing over stdin/stdout. Reads and writesContent-Length: N\r\n\r\n{json}— the protocol's one concession to HTTP that nobody asked for.
go get github.com/toba/lsp