Skip to content

Language Server And VS Code

Chris Michael edited this page Sep 2, 2026 · 3 revisions

Pudu

Language Server And VS Code

pudu lsp

Status: a compiler-backed LSP server and thin VS Code client are implemented. Synchronization is full-document.

Principle

The server does not contain another Pudu analyser. It compiles the editor-owned buffer through the same frontend, resolver, type checker, diagnostics, formatter, and documentation index used by the CLI.

Capabilities

Capability Status
Initialize/shutdown/exit lifecycle Implemented
Full-document open/change/close Implemented
Diagnostics Implemented
Hover Implemented for inferred declarations and local bindings
Go to definition Implemented
Document symbols Implemented
Completion Implemented for documented names, built-in methods, and program impl methods
Whole-document formatting Implemented
Rename Not implemented
Find references Not implemented
Workspace symbols Not implemented
Semantic tokens Not implemented

Only implemented capabilities are advertised. Unknown requests receive a method-not-found error; notifications are never answered.

Document model

Open editor text is authoritative, including unsaved changes. The server stores one analysis per document and publishes diagnostics under that document URI. UTF-16 position conversion and byte accurate Content-Length framing are tested.

VS Code client

The extension under editors/vscode associates .pudu files and launches pudu lsp. It owns editor activation and process lifecycle; language meaning remains in the compiler.

Set pudu.serverPath when the current compiler is not on PATH. See Getting Started for deterministic refresh and behavioral verification. The shared development version number is not sufficient evidence that the extension launched the latest binary; the real-session compatibility gate is the behavioral check.

Compatibility gate

The real-session test opens an intentionally invalid document and a clean compatibility document. The latter covers if let, let … else, while let, postfix ?, and a diverging/value match join, and must receive an empty diagnostic publication from the installed server.

Related

Clone this wiki locally