Feature improvements
Diagnostics
show diagnostics from running build.zig (#2377)
Errors from failing to compile a build.zig
file are now reported as diagnostics in the editor. They will also continue to be written to the logs. This works even if build on save is not enabled.
Show Example

Diagnostics in a build.zig
file (Neovim with folke/trouble.nvim)
mark diagnostics about unused variables as “unnecessary” (#2387)
Any diagnostics that come from unused variables will now be marked as “unnecessary” over the LSP protocol. This informs the editor that the diagnostic is caused by unused or unnecessary code which may be used to show the diagnostic in a different style.
Show Example

Highlighting of unused variables (Neovim with folke/tokyonight.nvim)
The squiggly line is gone and the variable is faded out instead.
Semantic Tokens
add token modifier for mutable declarations (#2244)
Declarations that are var
as opposed to const
will now get a non-standard LSP token modifier called “mutable”. Depending on the theme being used, this may affect how they are displayed.
Show Example

Highlighting of mutable declarations (Neovim with folke/tokyonight.nvim)
Tokyonight is unaffected by default so this highlight has been configured manually. Notice how "variable" is rendered in italic.
Code Analysis
Improvements to code analysis are not typically included in the release notes, since each release contains numerous minor changes that are difficult to summarize individually. However, it should be mentioned that this release stands out for containing a greater number of contributions to code analysis than usual. Special thanks goes to FnControlOption who has contributed the majority of code analysis related improvements in this release.
add token modifier for variables with static lifetime (#2260)
Variables with static lifetime will now get the standard LSP token modifier called “static”. Depending on the theme being, this may affect how they are displayed.
Show Example

Special highlight of static variables
(Neovim with folke/tokyonight.nvim)
add token tag for escape sequences (#2243)
In some editors, such as Neovim, escape sequences in string literals would lose their highlighting when using LSP-based semantic highlighting instead of syntax-based highlighting. To address this, the server now emits a non-standard escapeSequence
token tag if possible.
support for organizing imports at the bottom of a file (#2391)
The source.organizeImports
will move all imports to the bottom of the file if at least one of them is already located there:
const std = @import("std");
const print = std.debug.print;
pub fn main() !void {
print("Hello World\n", .{});
}
const builtin = @import("builtin");
→
pub fn main() !void {
print("Hello World\n", .{});
}
const std = @import("std");
const print = std.debug.print;
const builtin = @import("builtin");
watch for changes in unopened files (#2238)
The language server now registers for the workspace/didChangeWatchedFiles
LSP notification to track modifications to files that are not directly opened in the editor. Without this mechanism, edits made by external programs (such as Git) could cause the server’s view of the files to become out of sync, potentially leading to incorrect results.
highlight matching control flow keywords (#2323)
Document highlight and references request on while
, for
or switch
keywords will show all break
or continue
keywords that reference them. A request on break
or continue
will have the opposite response.
Show Example

Highlighting of control flow statements (Neovim with folke/tokyonight.nvim)
Holding the cursor on the outer for
will highlight the referenced break
and continue
keywords in bold.
This behaviour must be manually in Neovim. See document highlighting
improved webassembly support (#2278, #2328)
Even though a wasm32-wasi
builds has been available since the 0.11.0 release, running in webassembly needed further care to be usable in practice due how restrictive this target can be compared to others. Over time we have improve webassembly support thanks to the testing in the Zig Playground. Further improvements to the playground are planned, alongside ongoing work to make ZLS usable in VS Code as a browser extension.
Contributors
Here is a list of everyone who has made at least one contribution to this release of ZLS:
- Techatrix
- FnControlOption
- xdBronch
- Lee Cannon
- Will Lillis
- mochalins
- Kurt
- Lucas Santos
- Carmen
- Evan Elias Young
- Gabriel Borrelli
- Gabriel Ford
- Joey Chan
- Jørgen Kristensen
- LN Liberda
- Marty Field
- Seiichi Uchida
- The-Emperor10
- Tristan Pemble
- darkdarcool
- dbger
- futsuuu
Sponsors
We’d like to take a second to thank all our awesome contributors and donators/backers/sponsors; if you have time or money to spare, consider partaking in either of these options - they help keep ZLS awesome for everyone!
Full Changelog: 0.14.0…0.15.0
Release Artifacts
Release filenames have changed
The operating system and cpu archtecture in the filename have been swapped to match the equivalent change that happened in Zig’s tarballs. armv7a
also has been renamed to arm
for the same reason.
All files are signed with minisign using this public key:
RWR+9B91GBZ0zOjh6Lr17+zKf5BoSuFvrx2xSeDE57uIYvnKBGmMjOex
OS | Arch | Filename | Signature | Size |
---|---|---|---|---|
Windows | x86_64 | zls-x86_64-windows-0.15.0.zip | minisig | 4.25 MiB |
Windows | aarch64 | zls-aarch64-windows-0.15.0.zip | minisig | 4.04 MiB |
Windows | x86 | zls-x86-windows-0.15.0.zip | minisig | 4.3 MiB |
macOS | x86_64 | zls-x86_64-macos-0.15.0.tar.xz | minisig | 1.11 MiB |
macOS | aarch64 | zls-aarch64-macos-0.15.0.tar.xz | minisig | 971.43 KiB |
Linux | x86_64 | zls-x86_64-linux-0.15.0.tar.xz | minisig | 3.6 MiB |
Linux | aarch64 | zls-aarch64-linux-0.15.0.tar.xz | minisig | 3.38 MiB |
Linux | arm | zls-arm-linux-0.15.0.tar.xz | minisig | 3.5 MiB |
Linux | riscv64 | zls-riscv64-linux-0.15.0.tar.xz | minisig | 4.22 MiB |
Linux | powerpc64le | zls-powerpc64le-linux-0.15.0.tar.xz | minisig | 3.47 MiB |
Linux | x86 | zls-x86-linux-0.15.0.tar.xz | minisig | 3.57 MiB |
Linux | loongarch64 | zls-loongarch64-linux-0.15.0.tar.xz | minisig | 3.22 MiB |
Linux | s390x | zls-s390x-linux-0.15.0.tar.xz | minisig | 3.95 MiB |
WASI | Wasm | zls-wasm32-wasi-0.15.0.tar.xz | minisig | 2.21 MiB |