Documentation
¶
Overview ¶
Package lsp implements the Warden Language Server Protocol server for the .warden DSL.
Both binaries reach the same code: the standalone `cmd/warden-lsp` and the `warden lsp` subcommand both delegate to lsp.Run, so editor configs can point at either entry point interchangeably.
Protocol layer: minimal hand-rolled JSON-RPC 2.0 with LSP framing (Content-Length headers). No external dependencies — reuses dsl/ for parsing, resolving, formatting, and AST queries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run starts the LSP server, reading JSON-RPC framed messages from in and writing responses + notifications to out. It blocks until the client disconnects (EOF on in) or sends an `exit` notification.
Both `cmd/warden-lsp` and `warden lsp` (subcommand) delegate here so the two entry points stay byte-for-byte equivalent. A nil return means "client disconnected cleanly"; callers typically convert that into a 0 exit code.
Types ¶
This section is empty.