Documentation
¶
Overview ¶
Package lsp is m-cli's Language Server (spec §3.1): LSP 3.x over stdio, reusing the lint and fmt engines so the editor shows exactly the diagnostics CI produces. JSON-RPC framing is hand-rolled on the stdlib to keep the SBOM minimal (no LSP-library dependency). This first increment wires the foundation — lifecycle, full text sync, push diagnostics, and formatting; hover/completion/definition/symbols/code-actions layer on later.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a stdio LSP server. It owns one parser, a document store, and a cache of linters keyed by the project config governing each document — so a file's diagnostics use the SAME resolved rule set `m lint`/pre-commit would (G2). The message loop is single-threaded, so the parser is never used concurrently. Build with New, run with Serve, release with Close.