Language Server Protocol (LSP) implementation for the minilang language.
Spun out of the minilang-vscode extension. The VS Code extension hosts this
server; it can also be used by any LSP client (Neovim, Zed, Emacs, …).
- Live diagnostics — shells out to the real
minilangtoolchain and mapsParse error line N/Compile errorto diagnostics as you type. - Hover — docs for builtins, syslib functions and C-native methods.
- Completion — builtins,
math.*/string.*/list.*/json.*/io.*/rand.*names, and the native methods (sqrt,time, …).
A built minilang binary from
minilang-boot. Point the
client setting minilang.path at it, or have minilang on PATH.
npm install
npm run build
node out/server.js # speaks LSP over stdionpm test # builds, then runs test/e2e.js against a real minilang binaryThe e2e test spawns the server over stdio and asserts the diagnostics it sends for syntax errors, undefined names, missing modules, circular requires, a clean file, and a missing toolchain binary. It also verifies that validating a dirty buffer never writes into the real source file (the server validates a staging copy and cleans up after itself).
MIT.