Skip to content
FossShelf
Home / Categories / For Engineers

Zls

Open source language server for Zig with completions and diagnostics.

Replaces —

5.33K stars

Who it's for

Zig development in VS Code

VS Code users get ZLS automatically through the official Zig Language extension, which handles both Zig and ZLS installation without manual binary setup. This is the lowest-friction path for developers already using VS Code for other languages who want to add Zig to their workflow.

User is working in a paid commercial IDE that already provides Zig language support.

Systems programming in Neovim or Helix

Developers using terminal-centric editors configure ZLS once via the editor's LSP client and get full code intelligence alongside their existing keybindings and plugins. Helix supports ZLS with minimal configuration beyond pointing it at the binary path.

User is on an editor without LSP support and is not willing to switch.

Learning Zig with editor assistance

For developers learning Zig, hover documentation and go-to-definition reduce the number of times you need to leave the editor to look up standard library types. ZLS makes the standard library more navigable while you build familiarity with the language's type system and comptime features.

User is learning through an online Zig playground or course environment that provides its own editor tooling.

The problem

Zig is a systems programming language with a type system and comptime evaluation that demands good editor tooling to navigate effectively. Without a language server, developers working in Zig face the same friction as pre-LSP C development: no inline type information, no completions that understand the full type chain, no jump-to-definition across files, and no diagnostics until the compiler runs. The gap is practical: every time a developer needs to check a resolved type, follow a reference, or catch an error before compilation, they interrupt their flow to read documentation or run the compiler. For teams and individuals already invested in VS Code, Neovim, Helix, or Emacs, buying a new commercial IDE just to get Zig support is an expensive way to solve an editor tooling problem.

How it works

Completions and hover documentation

Provides editor completions scoped to Zig's type system, including payload capture type resolution, custom package support, and simple type function support. Hover shows resolved types inline so you can inspect a variable's full type without leaving your cursor position.

Go-to-definition and find references

Jumps to any symbol's definition or declaration across the whole workspace, and finds every reference to a symbol. Rename symbol propagates the change across files. These features work for both user-defined symbols and standard library identifiers.

Diagnostics with optional build-on-save

Shows errors and warnings inline as you write. The optional build-on-save mode runs the Zig compiler on file save and surfaces diagnostics that require a full build pass, such as cross-file type mismatches, before you switch to the terminal.

Formatting via zig fmt

Formats code through the same `zig fmt` binary that ships with Zig, ensuring consistent output. Any editor that calls the LSP format action gets the canonical Zig format, with no separate formatter to install or configure.

Semantic token highlighting and inlay hints

Sends semantic token data to the editor so syntax highlighting reflects actual type information rather than just token patterns. Inlay hints overlay resolved parameter names and types at call sites, reducing the need to jump to definitions to understand what each argument represents.

Features

  • Completions and hover documentation
  • Go-to-definition and find references
  • Diagnostics with optional build-on-save
  • Formatting via zig fmt
  • Semantic token highlighting and inlay hints

How to install

Download the prebuilt ZLS binary for your platform and Zig version from GitHub Releases: https://github.com/zigtools/zls/releases/latest

Recommended for this setup

Strengths

  • MIT license with no usage restrictions: MIT means you can use ZLS in commercial projects, redistribute it, and modify it without any obligation. Unlike proprietary IDE extensions that require a subscription, ZLS carries no licensing cost for individual developers or teams.
  • Works with any LSP-compatible editor: ZLS is a standalone binary that the editor connects to over the Language Server Protocol. VS Code, Neovim, Helix, and Emacs are common choices; any other editor with LSP support works the same way. ZLS does not need to know which editor is connecting, making it genuinely editor-agnostic.
  • Versioned to match Zig releases: Every tagged Zig release has a corresponding tagged ZLS release, and every nightly Zig build pairs with a nightly ZLS build. The install tool on zigtools.org resolves compatible pairs automatically, so version mismatches are a first-class solved problem rather than a recurring support question.
  • Active development since 2020: The project has accumulated 5,313 GitHub stars and 467 forks since its creation in April 2020, with the last push in October 2026. Community contributors maintain the codebase, and the zigtools Discord provides active support.

Trade-offs

  • Comptime and semantic analysis support is incomplete: The README notes that support for comptime and full semantic analysis is still work-in-progress. Zig's comptime system is one of its most distinctive features, and ZLS cannot yet resolve all types and values that depend on comptime evaluation. Completions and hover may be inaccurate or missing in code that heavily uses comptime logic.
  • 159 open issues: The repository has 159 open issues. Some represent long-standing rough edges, particularly around edge cases in the type resolver. The project is actively maintained, but complex Zig code can still produce incorrect or missing completions in those edge cases.
  • Version pairing requires discipline: ZLS must match your installed Zig version: tagged with tagged, nightly with nightly. If you manage Zig through a third-party package manager that installs a version ZLS does not match, completions will break. The install tool at zigtools.org automates the pairing, but manual installs require attention to version alignment.

Tech stack

Languages
—
Frameworks
—
Databases
—
Tooling
—

FAQ

Is ZLS an official Zig language server?

ZLS is a non-official, community-maintained project. It is not part of the Zig compiler or standard library, and is not maintained by the Zig Software Foundation. The zigtools organization builds and maintains it independently, with community contributors and backers through OpenCollective.

Which editors work with ZLS?

Any editor that supports the Language Server Protocol works with ZLS. Common choices include VS Code (via the Zig Language extension, which installs ZLS automatically), Neovim, Helix, and Emacs. The editor configuration section of the zigtools website lists setup instructions for each.

Which Zig version does ZLS support?

ZLS targets the Zig version it was built against. A tagged ZLS release pairs with the same tagged Zig release; a nightly ZLS build pairs with a nightly Zig build. The install tool at zigtools.org/zls/install/ resolves the correct pair automatically. Using mismatched versions will result in broken or missing completions.

Can ZLS be used in commercial projects?

Yes. ZLS is MIT licensed, which imposes no restrictions on commercial use. You can use it in any project, including proprietary commercial software, without attribution or fee.

How do I install ZLS?

For VS Code, the official Zig Language extension installs ZLS automatically with no manual steps needed. For other editors, download the prebuilt binary for your platform from the install tool at zigtools.org/zls/install/, then point your editor's LSP config at the binary path. The install tool auto-selects the ZLS version compatible with your installed Zig.

Similar tools

More in Engineers