Skip to main content

Crate adam_lsp

Crate adam_lsp 

Source
Expand description

§adam-lsp

A Language Server Protocol server for adam-lang, built on lsp-server + lsp-types. Surfaces adam-lang’s recovered syntax errors and [adam_lang::check_sheet]’s type diagnostics as textDocument/publishDiagnostics.

§Example

fn main() -> anyhow::Result<()> {
    adam_lsp::run()
}

Modules§

diagnostics
Computes LSP diagnostics for adam-lang source text. No LSP transport knowledge lives here — see crate::dispatch for that — so this module’s tests exercise the diagnostic logic directly, per the design doc’s testing strategy (handler-level unit tests over full protocol round-trips where possible).

Functions§

run
Runs the adam-lang language server on stdin/stdout until the client sends exit.
serve
Performs the LSP initialize handshake on connection, then serves textDocument/didOpen and textDocument/didChange notifications as textDocument/publishDiagnostics until the client shuts the server down.