Skip to main content
Language v0.2.0 · Preview

Incremental N/M Language Server

Use a bounded JSON-RPC lifecycle, stale-version-safe document sync, reusable 5,000-document workspace indexes, and byte-identical Core, standalone, and VS Code behavior.

Public npm installation

Install the standalone language server

Start the bounded stdio LSP server from an editor that supports a configurable language-server command. The official VS Code extension already bundles its own server.

Requires Node.js 20 or newer. Release checks use Node.js 22.23.1.

npm package 0.2.1 targets N/M language 0.2.0. next selects the preview channel and can change; use @0.2.1 to reproduce this release. An untagged install selects latest. The VS Code extension has a separate distribution version.

npm install --global @nm-lang/language-server@next

To pin this release:

npm install --global @nm-lang/language-server@0.2.1

Editor server command; the client handles Content-Length framing and initialization

nm-lsp

Examples run on a local simulator. Installation does not establish physical QPU access or make every capability stable.

Personal, educational and commercial use is free. QuantumSoftware retains rights to its package code; modification and redistribution require separate permission. Your N/M programs and results remain yours. Read LICENSE.txt in the installed package.

Frozen LSP transport and index contract

The Core handler, standalone stdio server, and bundled VS Code server emit byte-identical JSON-RPC responses for the frozen matrix. The stdio surface enforces initialize → shutdown → exit lifecycle and bounded Content-Length framing.

2026-07-29
contract
5000
documents
5 MB
workspace

Document synchronization

Full text and at most 100 ordered incremental changes are accepted. Stale versions, unknown documents, reversed/out-of-range edits, unsafe URIs, and oversized text are ignored without mutating the last valid state.

Incremental workspace index

Unchanged URI+source module/import analysis and document symbols are reused. Dependency and reverse-dependency graphs are rebuilt deterministically so duplicate, missing, and cyclic imports cannot retain stale state.

Surface parity

Core, @nm-lang/language-server, and the VS Code bundle share the same initialization capabilities, diagnostics, navigation, rename, semantic-token, workspace-symbol, and index-stat response bytes.

Index evidence

workspace/indexStats exposes generation, analyzed/reused document counts, source bytes, and incrementally analyzed symbol documents without exposing source text.

1 MB
document
8 MB
message
8.192 KB
header
100
changes

JSON-RPC

npm run nm:lsp

{ "jsonrpc": "2.0", "id": 4, "method": "workspace/indexStats" }
NM-LSP-001NM-LSP-002NM-LSP-003NM-LSP-004NM-LSP-005NM-LSP-006

Contract 0.1 is a bounded stdio server. Dynamic registration, work-done cancellation, remote transports, and certification of editors other than VS Code remain outside the frozen matrix.