Iron LSP

Real-time language intelligence for .iron files in VSCode, Neovim, and Zed. Diagnostics that match the compiler exactly — never a divergence between what your editor flags and what ironc produces.

What you get

Diagnostics
Lex, parse, and type errors as you type. Same error codes and spans as ironc check, byte-identical.
Hover & Goto Definition
Type and signature info on hover. Jump to the definition of any identifier — functions, methods, fields, enum variants.
Completion
In-scope identifier completion. Method completion on a value's type. Module-qualified completion for stdlib symbols.
Document & Workspace Symbols
Outline view per file. Workspace-wide symbol search across every .iron file in the project.
References & Rename
Find every reader of a symbol. Safe project-wide rename that won't touch shadowed names or unrelated identifiers.
Type Hierarchy & Code Actions
Walk supertypes and subtypes for any object. Quick fixes for common diagnostics. Format on save via ironc fmt.

Editor extensions

The Iron installer (~/.iron/bin/ironls) ships the language server. Install one of the editor extensions below, and your editor will discover and spawn it automatically.

VSCode

Search "Iron Language Support" in the Marketplace, or install from the .vsix bundled with each release.

VSCode extension

Neovim

Built-in LSP client + the Iron filetype plugin. Drop the snippet from the Neovim README into your config.

Neovim setup

Zed

Search "Iron LSP" in the Zed extensions panel. The extension downloads ironls from the matching release and verifies its SHA-256.

Zed extension

Configuration

Use a custom ironls binary
If you've built ironls locally and want your editor to use it instead of the bundled release binary, set the iron_lsp_path override:
  • VSCode: "iron-lsp.serverPath" in settings.json
  • Neovim: pass cmd = { "/path/to/ironls" } when calling vim.lsp.start
  • Zed: "lsp": { "iron-lsp": { "binary": { "path": "/path/to/ironls" } } }
Version pinning
Each editor extension declares a compatible ironls version range. If your binary falls outside the range, the extension refuses to spawn it and shows a notification — your project never silently runs against an incompatible server.
Logs
Set iron_lsp_log_level to debug for verbose output. Each editor exposes the LSP stderr stream through its standard logs panel — use it when diagnosing startup or version-mismatch issues.

The parity guarantee

Iron's LSP isn't a parallel implementation of the language — it links the compiler frontend (iron_compiler) directly as a static library. Every diagnostic span, every error code, every type lookup comes from the same code path that ironc uses. That is the core promise: what your editor flags, the compiler flags. CI runs a byte-identical comparison on every commit to ensure they never drift.

Read the LSP source