axon-lsp
Language Server Protocol implementation for the Axon programming language. A single Rust binary that speaks LSP and, by construction, works in VSCode, Claude Code, Cursor, Antigravity, Zed, Neovim — or anything else that speaks LSP — with no per-IDE work.
Status: v0.1.1 released — published on crates.io with
axon-frontend = "0.2"as a registry dep. Roadmap and Resultado blocks for every sub-fase live indocs/plan_v0.1.0.md. Install viacargo install axon-lsp, download from GitHub Releases, install the VSCode extension, or build from source — see docs/integrations/install.md.
What it does
| Capability | Behavior |
|---|---|
publishDiagnostics |
Lex / parse / type errors with axon-{lex,parse,type} source tag and precise ranges (whole identifier for type errors, single char for punctuation) |
hover |
Markdown — local declarations show kind + signature; built-in types (String, Channel, Trusted, …) and syntax keywords pull rich docs from the embedded corpus |
definition |
Zero-width Location at the declaration's keyword |
documentSymbol |
Outline tree with sensible SymbolKind per declaration kind |
completion |
Context-aware: inside a type annotation surfaces only types, in declaration name slots stays out of the way, default context offers keyword snippets + user decls + built-in types with lsp-docs documentation attached |
axon/askAdvisor (opt-in) |
Custom LSP method backed by Anthropic's Messages API. Two-axis gate: build with --features llm AND set AXON_LSP_LLM_ENABLED=1 + ANTHROPIC_API_KEY=…. Default builds reply with MethodNotFound; the deterministic stack is unaffected by either gate. |
Editor integrations
Single binary, every editor. Pick yours and follow the doc:
- VSCode — docs/integrations/vscode.md (extension source)
- Cursor — docs/integrations/cursor.md
- Antigravity — docs/integrations/antigravity.md
- Zed — docs/integrations/zed.md
- Neovim — docs/integrations/neovim.md
- Claude Code — docs/integrations/claude-code.md
docs/integrations/README.md carries
the index plus the canonical 4-check smoke-test program every editor
must light up.
Architecture
crates/
axon-lsp/ # binary, tower-lsp bootstrap + 6 LSP capabilities
lsp-core/ # logic — pure, sync, no I/O
# document.rs (rope), diagnostics.rs (range scanner),
# hover.rs, definition.rs, completion.rs (context heuristic),
# symbols.rs (DeclMeta + outline), text.rs (shared helpers),
# frontend.rs (axon-frontend shim)
lsp-docs/ # 18 Markdown entries embedded at compile time via build.rs;
# zero runtime deps, lookups hit `&'static str` slices
lsp-llm/ # opt-in advisor, feature = "llm";
# default builds keep `reqwest` out of the binary entirely
# — pinned by an executable smoke test that scans the
# release binary for forbidden symbol bytes
editors/
vscode/ # TypeScript extension; spawns the binary, attaches
# the editor's selection as advisor context, ships
# commands + snippets
docs/
plan_v0.1.0.md # the live roadmap + Resultado blocks
integrations/ # one self-contained doc per editor
lsp-core and lsp-docs keep cargo tree --edges normal empty of
tokio / axum / sqlx / aws-* / reqwest / hyper / jsonwebtoken —
verified in CI on every commit. The Fase 12.c contract (frontend with
zero runtime deps) holds end-to-end into the LSP binary.
Build
Rust 1.95.0 stable (pinned by rust-toolchain.toml).
The advisor crate is excluded from the default build:
Releases
Releases page publishes:
- 3 platform archives (
linux-x86_64,macos-arm64,windows-x86_64) — one binary each. SHA256SUMS— combined integrity-verification list.
macOS Intel (x86_64-apple-darwin) builds from source
(cargo install axon-lsp) until a cross-compiled / self-hosted
target lands in a later release.
Auto-generated release notes summarise the commits since the
previous tag. The full v0.1.0 story lives in
CHANGELOG.md and the per-sub-fase Resultado blocks
in docs/plan_v0.1.0.md.
Contributing
axon-lsp is adopter-agnostic — it serves the Axon language the
same way rust-analyzer serves Rust. No customer or tenant names
appear in code, tests, fixtures, or docs. Details in
CONTRIBUTING.md.
License
MIT — see LICENSE.