|
| 1 | +--- |
| 2 | +{ |
| 3 | + .title = "ZLS 0.14.0", |
| 4 | + .date = @date("2025-03-06T23:25:53Z"), |
| 5 | + .author = "Techatrix", |
| 6 | + .layout = "zls-release.shtml", |
| 7 | +} |
| 8 | +--- |
| 9 | + |
| 10 | +## Feature improvements |
| 11 | + |
| 12 | +### New zigtools website |
| 13 | + |
| 14 | +As you may have noticed upon opening this page, a new https://zigtools.org website has been created, providing up-to-date documentation for ZLS. It is highly recommended to check it out, even if you've already set up ZLS previously. |
| 15 | + |
| 16 | +### Better Build On Save ([#2096](https://github.com/zigtools/zls/pull/2096)) |
| 17 | + |
| 18 | +The build-on-save implementation has been completely rewritten to leverage Zig's new [File System Watching](https://ziglang.org/download/0.14.0/release-notes.html#toc-File-System-Watching) feature. When combined with [Incremental Compilation](https://ziglang.org/download/0.14.0/release-notes.html#toc-Incremental-Compilation), which is not yet enabled by default, this allows compile errors to be reported *almost* immediately after each save. For more details, check out to the ZLS [Build-On-Save](https://zigtools.org/zls/guides/build-on-save/) guide. |
| 19 | + |
| 20 | +Here is a showcase where build-on-save runs the equivalent of `zig build check --watch -fincremental` within the ZLS codebase: |
| 21 | + |
| 22 | +[build on save with incremental compilation enabled]($video.asset('build-on-save-demo.mp4').controls(true).loop(true).muted(true)) |
| 23 | + |
| 24 | +### `zls env` command ([#1957](https://github.com/zigtools/zls/pull/1957)) |
| 25 | + |
| 26 | +A new `zls env` command has been added, similar to zig env, serving the same purpose. |
| 27 | + |
| 28 | +Here is an example of how its output may look like: |
| 29 | + |
| 30 | +```json |
| 31 | +{ |
| 32 | + "version": "0.14.0", |
| 33 | + "global_cache_dir": "/home/anon/.cache/zls", |
| 34 | + "global_config_dir": "/etc/xdg", |
| 35 | + "local_config_dir": "/home/anon/.config", |
| 36 | + "config_file": "/home/anon/.config/zls.json", |
| 37 | + "log_file": "/home/anon/.cache/zls/zls.log" |
| 38 | +} |
| 39 | +``` |
| 40 | + |
| 41 | +The exact output can be found in the [`Env`](https://github.com/zigtools/zls/blob/7485feeeda45d1ad09422ae83af73307ab9e6c9e/src/main.zig#L132) struct. |
| 42 | + |
| 43 | +### `zls.log` ([#1957](https://github.com/zigtools/zls/pull/1957)) |
| 44 | + |
| 45 | +Log messages are now written to a new `zls.log` file. Its content is more readable than some editor internal logs and does not require looking up how each editor manages LSP server logs. For more details, check out the [logging guide](https://zigtools.org/zls/guides/view-logs/). |
| 46 | + |
| 47 | +### configure autofix through editor settings ([#2063](https://github.com/zigtools/zls/pull/2063)) |
| 48 | + |
| 49 | +Many editors provide their own settings for code actions on save, often offering a better user experience than relying on the LSP server like ZLS. If you have the "autofix" feature enabled via `enable_autofix`, you'll need to update your editor configuration. For upgrade instructions, check out the [Installation Guide](https://zigtools.org/zls/install/) and navigate to the relevant documentation for your editor. |
| 50 | + |
| 51 | +### hover over character literal ([#1991](https://github.com/zigtools/zls/pull/1991)) |
| 52 | + |
| 53 | +Similar to hovering over a number literal, you can now hover over a character literal to view its value in various number systems. |
| 54 | + |
| 55 | +```=html |
| 56 | +<figure> |
| 57 | + <picture style="display: flex;flex-direction: column;align-items: center;"> |
| 58 | + <source srcset="/0.14.0-hover-over-character-literal-dark.png" media="(prefers-color-scheme: dark)"> |
| 59 | + <img src="/0.14.0-hover-over-character-literal.png" alt="" width="450px" style="aspect-ratio: 600 / 500;"> |
| 60 | + </picture> |
| 61 | + <figcaption>hovering over a character literal</figcaption> |
| 62 | +</figure> |
| 63 | +``` |
| 64 | + |
| 65 | +### report zon specific compile errors |
| 66 | + |
| 67 | +Thanks to Zig's new standard library utilities for [ZON Parsing and Serialization](https://ziglang.org/download/0.14.0/release-notes.html#ZON-Parsing-and-Serialization), `.zon` files will now display diagnostic messages for syntactically invalid ZON code. |
| 68 | + |
| 69 | +### Code action to organize imports ([#2051](https://github.com/zigtools/zls/pull/2051)) |
| 70 | + |
| 71 | +A new code action has been added that can organize top-level `@import` and alias declarations. |
| 72 | + |
| 73 | +Here is an example of how the code action will organize the code: |
| 74 | + |
| 75 | +```zig |
| 76 | +const std = @import("std"); |
| 77 | +const Ast = std.zig.Ast; |
| 78 | +const Node = Ast.Node; |
| 79 | +const full = Ast.full; |
| 80 | +const builtin = @import("builtin"); |
| 81 | + |
| 82 | +const lsp = @import("lsp"); |
| 83 | +const types = lsp.types; |
| 84 | + |
| 85 | +const Config = @import("Config.zig"); |
| 86 | +const offsets = @import("offsets.zig"); |
| 87 | +``` |
| 88 | + |
| 89 | +This code action can be manually invoked or automatically triggered on save. For more information on how to run this code action on save, check out the [Installation Guide](https://zigtools.org/zls/install/) and navigate to the relevant documentation for your editor. Be aware that not all editors support this feature. |
| 90 | + |
| 91 | +### convert string literal code action ([#2097](https://github.com/zigtools/zls/pull/2097)) |
| 92 | + |
| 93 | +New code actions have been added to can convert between multi-line string literals and normal string literals. |
| 94 | + |
| 95 | +### progress report on build system ([#2141](https://github.com/zigtools/zls/pull/2141)) |
| 96 | + |
| 97 | +ZLS now reports when it is processing a `build.zig` file to extract build system information. This may be shown in the status indicator of your editor if supported. |
| 98 | + |
| 99 | +#### removed `enable_inlay_hints` config option |
| 100 | + |
| 101 | +This feature should be configured through your editor. Refer to the documentation of your editor on how configure this feature. |
| 102 | + |
| 103 | +## Contributors |
| 104 | + |
| 105 | +Here is a list of everyone who has made at least one contribution to this release of ZLS: |
| 106 | + |
| 107 | +- Techatrix |
| 108 | +- mochalins |
| 109 | +- FnControlOption |
| 110 | +- Sekky61 |
| 111 | +- xdBronch |
| 112 | +- Will Lillis |
| 113 | +- Auguste Rame |
| 114 | +- injuly |
| 115 | +- llogick |
| 116 | +- Alex Rønne Petersen |
| 117 | +- Ben Krieger |
| 118 | +- Julia Ortiz |
| 119 | +- kcbanner |
| 120 | +- Lorenzo Marzocchetti |
| 121 | +- Aleksei Piianin |
| 122 | +- Alexander Kosachev |
| 123 | +- Chinmay Dalal |
| 124 | +- Christofer Nolander |
| 125 | +- BratishkaErik |
| 126 | +- FalsePattern |
| 127 | +- GalaxyShard |
| 128 | +- Hicham Omari |
| 129 | +- InspectorBoat |
| 130 | +- Jarrod M. |
| 131 | +- Joshua Davis |
| 132 | +- Kevin Nguyen |
| 133 | +- Lee Cannon |
| 134 | +- Matthew Lugg |
| 135 | +- PanSashko |
| 136 | +- Sage Hane |
| 137 | +- Sam Atman |
| 138 | +- bangbangsheshotmedown |
| 139 | +- estevesnp |
| 140 | +- janis-bhm |
| 141 | +- sphaerophoria |
| 142 | + |
| 143 | +## Sponsors |
| 144 | + |
| 145 | +We'd like to take a second to thank all our awesome [contributors](https://github.com/zigtools/zls/graphs/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! |
| 146 | + |
| 147 | +```=html |
| 148 | +<figure> |
| 149 | + <a href="https://opencollective.com/zigtools#category-CONTRIBUTE"> |
| 150 | + <img src="https://opencollective.com/zigtools/backers.svg?limit=1000" alt="OpenCollective Backers"> |
| 151 | + </a> |
| 152 | +</figure> |
| 153 | +``` |
| 154 | + |
| 155 | +**Full Changelog**: [0.13.0...0.14.0](https://github.com/zigtools/zls/compare/0.13.0...0.14.0) |
| 156 | + |
| 157 | +## Release Artifacts |
| 158 | + |
| 159 | +| OS | Arch | Filename | Signature | Size | |
| 160 | +| ------- | ----------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------- | |
| 161 | +| Windows | x86_64 | [zls-x86_64-windows.zip ](https://builds.zigtools.org/zls-windows-x86_64-0.14.0.zip) | [minisig](https://builds.zigtools.org/zls-windows-x86_64-0.14.0.zip.minisig) | 4.18 MiB | |
| 162 | +| Windows | aarch64 | [zls-aarch64-windows.zip ](https://builds.zigtools.org/zls-windows-aarch64-0.14.0.zip) | [minisig](https://builds.zigtools.org/zls-windows-aarch64-0.14.0.zip.minisig) | 3.96 MiB | |
| 163 | +| Windows | x86 | [zls-x86-windows.zip ](https://builds.zigtools.org/zls-windows-x86-0.14.0.zip) | [minisig](https://builds.zigtools.org/zls-windows-x86-0.14.0.zip.minisig) | 4.35 MiB | |
| 164 | +| macOS | x86_64 | [zls-x86_64-macos.tar.xz ](https://builds.zigtools.org/zls-macos-x86_64-0.14.0.tar.xz) | [minisig](https://builds.zigtools.org/zls-macos-x86_64-0.14.0.tar.xz.minisig) | 1.04 MiB | |
| 165 | +| macOS | aarch64 | [zls-aarch64-macos.tar.xz ](https://builds.zigtools.org/zls-macos-aarch64-0.14.0.tar.xz) | [minisig](https://builds.zigtools.org/zls-macos-aarch64-0.14.0.tar.xz.minisig) | 906.22 KiB | |
| 166 | +| Linux | x86_64 | [zls-x86_64-linux.tar.xz ](https://builds.zigtools.org/zls-linux-x86_64-0.14.0.tar.xz) | [minisig](https://builds.zigtools.org/zls-linux-x86_64-0.14.0.tar.xz.minisig) | 3.4 MiB | |
| 167 | +| Linux | aarch64 | [zls-aarch64-linux.tar.xz ](https://builds.zigtools.org/zls-linux-aarch64-0.14.0.tar.xz) | [minisig](https://builds.zigtools.org/zls-linux-aarch64-0.14.0.tar.xz.minisig) | 3.21 MiB | |
| 168 | +| Linux | armv7a | [zls-armv7a-linux.tar.xz ](https://builds.zigtools.org/zls-linux-armv7a-0.14.0.tar.xz) | [minisig](https://builds.zigtools.org/zls-linux-armv7a-0.14.0.tar.xz.minisig) | 3.37 MiB | |
| 169 | +| Linux | riscv64 | [zls-riscv64-linux.tar.xz ](https://builds.zigtools.org/zls-linux-riscv64-0.14.0.tar.xz) | [minisig](https://builds.zigtools.org/zls-linux-riscv64-0.14.0.tar.xz.minisig) | 4.12 MiB | |
| 170 | +| Linux | powerpc64le | [zls-powerpc64le-linux.tar.xz](https://builds.zigtools.org/zls-linux-powerpc64le-0.14.0.tar.xz) | [minisig](https://builds.zigtools.org/zls-linux-powerpc64le-0.14.0.tar.xz.minisig) | 3.38 MiB | |
| 171 | +| Linux | x86 | [zls-x86-linux.tar.xz ](https://builds.zigtools.org/zls-linux-x86-0.14.0.tar.xz) | [minisig](https://builds.zigtools.org/zls-linux-x86-0.14.0.tar.xz.minisig) | 3.44 MiB | |
| 172 | +| Linux | loongarch64 | [zls-loongarch64-linux.tar.xz](https://builds.zigtools.org/zls-linux-loongarch64-0.14.0.tar.xz) | [minisig](https://builds.zigtools.org/zls-linux-loongarch64-0.14.0.tar.xz.minisig) | 3.09 MiB | |
| 173 | +| Wasm | WASI | [zls-wasm32-wasi.tar.xz ](https://builds.zigtools.org/zls-wasi-wasm32-0.14.0.tar.xz) | [minisig](https://builds.zigtools.org/zls-wasi-wasm32-0.14.0.tar.xz.minisig) | 2.21 MiB | |
0 commit comments