Zig Language Server (ZLS) integration for IDE features - autocomplete, goto definition, diagnostics, hover docs, and build-on-save. Use when setting up ZLS, debugging LSP issues, or optimizing Zig development workflows. Pairs with zig-programming skill.
/plugin marketplace add plurigrid/asi/plugin install asi-skills@asi-skillsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Zig Language Server (ZLS) provides IDE features for Zig development. This skill covers installation, configuration, build-on-save diagnostics, and troubleshooting.
| Feature | ZLS Support | Notes |
|---|---|---|
| Autocomplete | ✓ Full | Includes comptime-aware completion |
| Goto Definition | ✓ Full | Cross-file navigation |
| Find References | ✓ Full | All usages in workspace |
| Hover Documentation | ✓ Full | Inline docs from source |
| Diagnostics | ⚡ Parser-level | Semantic via build-on-save |
| Rename Symbol | ✓ Full | Safe refactoring |
| Code Actions | ✓ Partial | Fix imports, remove unused |
| Formatting | ✓ Full | Uses zig fmt |
# macOS (Homebrew)
brew install zls
# Nix/Flox
flox install zls
# Arch Linux
pacman -S zls
# From source (any platform)
git clone https://github.com/zigtools/zls
cd zls
zig build -Doptimize=ReleaseSafe
| Zig Version | ZLS Version | Notes |
|---|---|---|
| 0.15.x | 0.15.x | Current stable |
| 0.14.x | 0.14.x | Previous stable |
| 0.13.x | 0.13.x | Legacy |
| master | master | Build from source |
Always match ZLS version to Zig version.
~/.config/zls.json # Linux/macOS
%APPDATA%\zls.json # Windows
<project>/.zls.json # Project-specific
{
"zig_exe_path": "/path/to/zig",
"enable_autofix": true,
"enable_import_access": true,
"highlight_global_var_declarations": true,
"warn_style": true,
"enable_build_on_save": true,
"build_on_save_step": "check"
}
ZLS can run your build script on save to catch semantic errors (type mismatches, wrong argument counts) that parser-level analysis misses.
// build.zig
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const exe = b.addExecutable(.{
.name = "myapp",
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
b.installArtifact(exe);
// ZLS check step - runs on save
const check = b.addExecutable(.{
.name = "myapp",
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
const check_step = b.step("check", "Check compilation (for ZLS)");
check_step.dependOn(&check.step);
}
{
"enable_build_on_save": true,
"build_on_save_step": "check"
}
VS Code (zls extension):
// settings.json
{
"zig.zls.path": "/path/to/zls",
"zig.zls.enableBuildOnSave": true
}
Neovim (nvim-lspconfig):
require('lspconfig').zls.setup({
settings = {
zls = {
enable_build_on_save = true,
build_on_save_step = "check"
}
}
})
Emacs (lsp-mode):
(setq lsp-zig-zls-executable "/path/to/zls")
(setq lsp-zig-enable-build-on-save t)
pgrep -l zls~/.cache/zls/zls.logzig version vs zls --versionzig build check{
"skip_std_references": true,
"prefer_ast_check_as_child_process": true
}
{
"enable_import_access": true,
"additional_module_paths": ["deps/", "vendor/"]
}
check step exists in build.zigzig build check manuallyenable_build_on_save: trueZLS diagnostics map to triadic workflow:
| Diagnostic Type | Trit | Action |
|---|---|---|
| Error (red) | -1 | Must fix before build |
| Warning (yellow) | 0 | Review, may ignore |
| Hint (blue) | +1 | Optimization opportunity |
Conservation: errors + warnings + hints → 0 as code improves.
| Editor | Plugin | Config Path |
|---|---|---|
| VS Code | zls (extension) | .vscode/settings.json |
| Neovim | nvim-lspconfig | init.lua or lsp.lua |
| Helix | Built-in | languages.toml |
| Emacs | lsp-mode + lsp-zig | init.el |
| Sublime | LSP-zig | *.sublime-settings |
| Vim | vim-lsp or coc.nvim | .vimrc or coc-settings.json |
zig-programming - Core Zig language and stdlibzig-async-io - Async/concurrent patterns (0.16.0+)tree-sitter - AST-based code analysisThis skill connects to the K-Dense-AI/claude-scientific-skills ecosystem:
general: 734 citations in bib.duckdbThis skill maps to Cat# = Comod(P) as a bicomodule in the equipment structure:
Trit: 0 (ERGODIC)
Home: Prof
Poly Op: ⊗
Kan Role: Adj
Color: #26D826
The skill participates in triads satisfying:
(-1) + (0) + (+1) ≡ 0 (mod 3)
This ensures compositional coherence in the Cat# equipment structure.
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.