Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Language servers for diagnostics and code navigation.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Zig language server for Claude Code, providing code intelligence via ZLS.
.zig, .zon
Pick one method. ZLS must be on your PATH as zls.
Via ZVM (recommended — keeps zls and zig in lockstep):
zvm i master --zls
Add ~/.zvm/bin to your PATH.
Via prebuilt binary:
Download from https://zigtools.org/zls/install/ and place zls somewhere on your PATH.
Build from source:
git clone https://github.com/zigtools/zls
cd zls
zig build -Doptimize=ReleaseSafe
Verify installation:
zls --version
/plugin marketplace add agent-sh/zig-lsp
/plugin install zig-lsp@agent-sh
After install, open a .zig file. Claude Code will report zls diagnostics automatically after every Write / Edit and can call LSP operations (definition, references, hover) directly.
The plugin sets enable_build_on_save: true. To get compilation-level diagnostics (beyond syntax / parser errors), add a check step to your build.zig so ZLS can run zig build check without producing artifacts:
const exe_check = b.addExecutable(.{
.name = "myapp",
.root_module = b.createModule(.{
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
}),
});
const check = b.step("check", "Check if myapp compiles");
check.dependOn(&exe_check.step);
Without a check step, build-on-save runs the default install step, which compiles and writes artifacts. Without a build.zig, ZLS only runs zig ast-check: syntax and parser errors, no type errors.
The plugin ships its defaults as initializationOptions in .lsp.json (mirrored in the marketplace's lspServers block). ZLS gives initializationOptions priority over zls.json, so these eight options cannot be overridden there. Other options go in zls.json in your ZLS config directory (zls env prints the path). See the ZLS schema for the full list.
Defaults set by this plugin:
| Option | Value | Why |
|---|---|---|
enable_snippets | true | Snippet completions |
enable_argument_placeholders | true | Tabstops in function-call snippets |
enable_build_on_save | true | Real type diagnostics — see above |
semantic_tokens | "full" | Highlighting / structure for navigation |
inlay_hints_show_variable_type_hints | true | Inline types |
inlay_hints_show_parameter_name | true | Inline parameter names at call sites |
prefer_ast_check_as_child_process | true | Faster, more accurate parser-level errors |
startupTimeout | 30000 ms | Conservative — ZLS usually starts in under 3 s |
restartOnCrash and maxRestarts are left unset, so Claude Code's defaults apply: a crashed server restarts, up to 3 times. Early Claude Code 2.1 loaders rejected both fields with "restartOnCrash is not yet implemented. Remove this field from the configuration."
zls and zig must be the same version. On a mismatch ZLS warns that it does not support your Zig version, and analysis and builds can break. Claude Code restarts a crashed ZLS up to 3 times, then leaves it stopped until the session restarts. ZVM keeps zls and zig in lockstep - recommended.comptime-heavy code: ZLS cannot fully evaluate complex comptime expressions. The build-on-save step covers most of this gap.build.zig.zon: the package manifest is mapped to the zig language so you get LSP support inside it. Without this mapping, .zon files would be opaque.zls.exe, but the command field is just "zls" — the OS resolves the extension. Make sure the directory containing zls.exe is on PATH.If LSP features don't activate after install:
claude --debug
Look for Total LSP servers loaded: in the output. If 0, the plugin didn't pick up .lsp.json.
The debug log lands at ~/.claude/debug/<session-id>.txt; ~/.claude/debug/latest points at the current one.
Inside Claude Code, the /plugin panel's Installed and Errors tabs are the primary diagnostic surface.
MIT — see LICENSE.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub agent-sh/zig-lsp --plugin zig-lspPlugins from other owners that cover similar ground