DEVELOPMENT EDITION · 769442725406
Toolchain Manual

veradic lsp

Run the language server for an editor over stdin/stdout.

veradic lsp

The command takes no arguments: no source files, --project, proof budget or syntax. Each document is checked in its own project: the nearest verada.toml above it, else the one at a workspace folder's root, so the process's working directory does not matter. A malformed project file is reported as a diagnostic of the documents in it. Use an explicit CLI check before diagnosing editor lookup problems.

The process expects Content-Length-framed JSON-RPC (LSP 3.17), not interactive text. It advertises diagnostics, hover (with a subprogram's contracts), go to definition, references, highlights, the document outline, workspace symbols, rename, semantic tokens, signature help, code lenses (each subprogram's proof state, and a failed check's counterexample), diagnostic quick fixes, whole-document formatting and APL glyph completion, with incremental document synchronization and UTF-16 positions (or UTF-8 or code points, when the editor asks).

Open and change check the document. A clean check is followed, a second after the last change, by a proof in the background, and save proves too; the proof.trigger setting makes it prove only on save, and proof.notify says when a message reports the verdict (see the background prover). A proof shows progress the editor can cancel, and a stopped proof keeps what it had proved. Source extensions select frontends; the languageId alone does not change the file parser.

Stdout is reserved for protocol messages; no prompt or normal CLI diagnostic array appears. The server answers shutdown with a null result after stopping its checks and proofs, and exits on exit or closed input. Unknown requests get method-not-supported. Global diagnostics/color choices do not replace this wire protocol. Proofs use the project's normal proof cache, so the background prover, a terminal veradic prove and a cached veradic run share what each has proved.

For the Visual Studio Code and Zed plug-ins, launch recipes for other editors, the exact capabilities and their limits, see editors. A silent terminal after veradic lsp is normal: it is waiting for an editor message, not for a program to evaluate.