Zig Extra
lang.zig adds Zig support through zls. zls provides formatting with its
built-in zig fmt, and Blak’s core format config already falls back to the LSP
formatter, so no separate formatter is configured.
Enable it
-- ~/.config/blak/lua/blak/user.luareturn { extras = { enabled = { "lang.zig", }, },}Or enable it interactively:
:BlakExtras enable lang.zigWhat it adds
| Surface | Contribution |
|---|---|
| Treesitter | zig |
| LSP | zls (formatting via zig fmt) |
zls installs automatically through Mason.
Version pinning
zls tracks Zig versions: a tagged Zig release pairs with the matching tagged
zls release. Mason installs tagged zls builds, so if you run Zig nightly you
may need a manually built zls and can point the server’s cmd at it:
return { extras = { enabled = { "lang.zig" } }, lsp = { servers = { zls = { cmd = { vim.fn.expand("~/zls/zig-out/bin/zls") }, }, }, },}Install and verify
:BlakToolsInstall:BlakTreesitterInstall:BlakDoctorOpen a .zig file and check :LspInfo for zls.