Skip to content

toba/lsp

Repository files navigation

toba/lsp

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).

Packages

  • 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 between file:// 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 writes Content-Length: N\r\n\r\n{json} — the protocol's one concession to HTTP that nobody asked for.

Install

go get github.com/toba/lsp

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages