Skip to content

zig

The simplest way to get started with Zig is to use the version attribute, which automatically sets up both the Zig compiler and ZLS (Zig Language Server) from the zig-overlay:

languages.zig = {
enable = true;
version = "0.15.1";
};

This will automatically:

  • Use the specified Zig version from zig-overlay
  • Install the corresponding ZLS version (e.g., version “0.15.1” uses ZLS 0.15.0)

Alternatively, you can manually specify packages:

languages.zig = {
enable = true;
package = pkgs.zig;
zls.package = pkgs.zls;
};

Whether to enable tools for Zig development.

Type: boolean

Default:

false

Example:

true

Declared by:

Which package of Zig to use.

Type: package

Default:

pkgs.zig

Declared by:

Whether to enable Zig Language Server.

Type: boolean

Default:

true

Example:

true

Declared by:

The Zig language server package to use.

Type: package

Default:

pkgs.zls

Declared by:

The Zig version to use. This automatically sets the languages.zig.package and languages.zig.lsp.package using zig-overlay.

Type: null or string

Default:

null

Example:

"0.15.1"

Declared by: