ZLS brings completions, diagnostics, navigation, formatting, semantic tokens, and related LSP features to Zig editors, tracking Zig master releases.
Overview
ZLS implements the Language Server Protocol for the Zig language in Zig itself. Editors connect to the server for completions, hover, go-to-definition, find references, rename, formatting via zig fmt, inlay hints, and code actions.
Installation options include VS Code’s official Zig extension, prebuilt binaries signed with minisign, and building from source against Zig master with matched ZLS versions.
Semantic analysis and comptime support remain ongoing work, while many core LSP features are already available.
Version pairing rules require tagged Zig releases to use matching tagged ZLS builds, and nightly Zig to use nightly ZLS.
Key features
- LSP completions and hover
- Diagnostics with build-on-save option
- Go to definition and references
- Document and workspace symbols
- Rename symbol support
- zig fmt-based formatting
- Semantic token highlighting
- Inlay hints and code actions
Use cases
- Editing Zig in VS Code
- Navigating large Zig codebases
- Renaming symbols safely
- Catching errors while typing
- Consistent fmt-on-save formatting