Zed Extension
The nudo Zed extension attaches Nudo's language server to JavaScript and TypeScript buffers as a secondary language server — alongside vtsls / typescript-language-server.
Prerequisites
- Node.js on
PATH(or Zed's bundled Node runtime for the npm fallback) @nudojs/lsp≥ 0.5.0 available as one of:- project-local
node_modules/@nudojs/lsp(npm i @nudojs/lsp) - global install providing the
nudo-lspbin (npm i -g @nudojs/lsp) - Zed-managed npm install (automatic, if neither of the above is found)
- project-local
0.5.0+ ships dist/server.js with a nudo-lsp shebang entry and defaults to stdio when no transport flag is passed.
Install
The extension lives in a standalone repository: nudojs/nudo-zed.
From source (dev)
git clone https://github.com/nudojs/nudo-zed
In Zed: Extensions → Install Dev Extension… → select the cloned nudo-zed directory.
Settings
{
"languages": {
"JavaScript": {
"language_servers": ["vtsls", "nudo", "..."]
},
"TypeScript": {
"language_servers": ["vtsls", "nudo", "..."]
}
},
"code_lens": "on",
"inlay_hints": { "enabled": true }
}
"..." keeps the remaining registered language servers. Enable semantic tokens if you want type-aware highlighting:
{
"semantic_tokens": "combined"
}
Binary override
Skip discovery and point Zed at a specific server:
{
"lsp": {
"nudo": {
"binary": {
"path": "node",
"arguments": ["/abs/path/node_modules/@nudojs/lsp/dist/server.js"]
}
}
}
}
Or, if nudo-lsp is on PATH:
{
"lsp": {
"nudo": {
"binary": { "path": "nudo-lsp", "arguments": [] }
}
}
}
How the server is resolved
The extension's language_server_command tries, in order:
nudo-lsponPATH<worktree>/node_modules/@nudojs/lsp/dist/server.js(vianode)- Zed-managed
npm install @nudojs/lsp, resolved withrequire.resolve
Features in Zed
| Capability | Notes |
|---|---|
| Diagnostics | Automatic for analysis targets (.js/.mjs/.ts); see nudo.analysis.mode for directive-less files |
| Hover types | Standard LSP; exported fn names show ● interface / <source> (same as CodeLens) |
| Go to Definition / References / Rename | Standard LSP (sidecar binding names included) |
| Inlay hints | Enable inlay_hints.enabled; implicit exports mark derived |
| CodeLens | Enable code_lens: "on" — interface tier first (● interface, persist/update, ⚡ draft interface), case lenses behind |
| Semantic tokens | Default off; set semantic_tokens: "combined" — includes contract/generated/derived modifiers |
| Code actions / Signature help | Standard LSP quickfix + signature help |
Agent commands (nudo.check / nudo.interface.draft / …) | Reachable via any LSP client or Zed agent tooling |
CodeLens ⚡ draft interface runs the same code-first draft path as CLI nudo interface --draft (writes *.nudo.draft.js only when the client requests write: true). Migration walkthrough: Migrating existing JS.
VS Code-only decorations for the active case are not available; use the CodeLens case picker instead.
Full client comparison and known gaps: LSP Client Matrix.
File detection
Analysis targets are .js, .mjs, and .ts. Directive-only mode is conservative; open whole-file analysis with package.json#nudo.analysis.mode (exports | all). CodeLens interface tier uses the broader target path.
Building the WASM extension
Zed compiles the extension when you install a dev extension. Manual build:
rustup target add wasm32-wasip2
cd nudo-zed
cargo build --target wasm32-wasip2 --release
See also
- VS Code Extension
- LSP Client Matrix — capability alignment across editors
- Migrating existing JS — draft → review → check
- Versioning & Releases
- Agent Integration — the same server, for coding agents
- @nudojs/lsp API