Repository navigation
Releases
Releases · jinzhongjia/zig-analyzer
v0.1.1
Immutable
release. Only release title and notes can be modified.
Features
- Each platform also has a
ReleaseFastbuild next to the recommendedReleaseSafeone; the README explains which to pick (#310). - The archives and
SHA256SUMSare signed with minisign; verify them withminisign.pubfrom the repository (#310). - Each archive has a build provenance attestation (
gh attestation verify), is smoke-tested on its own platform before the release is published, and includesCHANGELOG.md(#311).
Fixes
- Files of the Zig installation are no longer compiled on their own when it lies under a workspace folder (such as Homebrew's prefix), which reported "file exists in modules 'std' and 'Build'"; single-file compiles and
builtin.ziggeneration no longer write a.zig-cacheinto the standard library or a project directory; in Neovim, the standard library and dependency packages reached by goto definition attach to the running server instead of starting another one; the Vim plugin with yegappan/lsp no longer takes a directory with aBuild.zigas the root on macOS and Windows (#323). - Unwrapping a C pointer (
.?,orelse, if / while captures) keeps its type, and literals in the arguments of@Int,@Pointer,@Fn,@Struct,@Union,@Enum, and@Tupleresolve (#314). - A value that breaks out of an
inline forgets its type from the iterations that reach the break (#315). - The macOS archives include
zig-analyzer.dSYM, so a panic prints file and line numbers; keep it next to the executable (#316).
Performance
- Hover and completion in files with many generic instances are faster: the slowest hover on the Zig compiler's
src/Sema.zigwent from 16 s to 11.5 s, and the slowest completion from 6 s to 1.8 s (#320). - Large projects load faster, and the first workspace symbol search after loading takes milliseconds instead of hundreds: on the Zig compiler source, loading takes 2 s instead of 3.5 s (#321).
v0.1.1-rc.1
Immutable
release. Only release title and notes can be modified.
A release candidate that tries the new release process; the server is the same as in 0.1.0.
Features
- Each platform also has a
ReleaseFastbuild next to the recommendedReleaseSafeone; the README explains which to pick (#310). - The archives and
SHA256SUMSare signed with minisign; verify them withminisign.pubfrom the repository (#310). - Each archive has a build provenance attestation (
gh attestation verify), is smoke-tested on its own platform before the release is published, and includesCHANGELOG.md(#311).
v0.1.0
The first release of zig-analyzer, a language server for Zig built on an incremental query engine.
Supports Zig 0.17.0 and 0.17.1. Prebuilt executables for Linux, macOS, and Windows (x86_64 and aarch64) are attached; SHA256SUMS lists their checksums.
Features
- Diagnostics come only from Zig itself: in-process AstGen while typing, and
zig buildover the build system protocol on save. Files withoutbuild.zigare compiled in single-file mode. Inactive code can optionally be marked. - Comptime evaluation: generics and type constructors are evaluated, and generic function bodies are analyzed with the instances from their call sites.
- Build system integration: the project model comes from
zig build --listen=-, including dependency packages, generated files, and sub-projects that depend on the root by.path. - Navigation: goto definition / declaration / type definition, find references, document highlight, document and workspace symbols.
- Editing: completion with auto-import and snippets, hover, signature help, inlay hints, and semantic tokens.
- Refactoring: rename, and code actions for unused names, parameters, and captures,
vartoconst, missing switch prongs and struct fields, extracting constants, converting string literals, and organizing imports. - Formatting identical to
zig fmt, for.zigand.zon. - ZON files: highlighting, formatting, and diagnostics in any
.zonfile; completion, goto, and inlay hints for files imported with a result type and forbuild.zig.zon; completion and option descriptions inzig-analyzer.zon. - Structure: folding ranges and selection ranges.
- Naming checks (opt-in), based on the Names section of the Zig style guide, with safe rename fixes.
Editors
- VS Code and Zed: extensions in
editors/vscodeandeditors/zed. - Neovim 0.12+: zig-analyzer.nvim, or a few lines of
vim.lsp.config(see the README). - Vim: zig-analyzer.vim, for yegappan/lsp or vim-lsp.
The extensions find zig-analyzer in PATH or at a configured path.