Skip to content

How to Configure VSCode with ZVM

ZVM is full-featured version manager for the Zig programming language. As part of its feature suite, you can automatically install the appropriate version of the Zig Language Server for your IDE.

Terminal window
zvm i <version> --zls

To use ZLS with VSCode, first, install the Zig Language extension. It will offer to install Zig and ZLS for you. Don’t do this. You will not be able to automatically switch between Zig versions, use community forks, or be able to work on projects based on older versions of Zig.

Then, access the extensions settings.

zls extension settings

You will need to update two settings: Zig path and ZLS path.

Zig path settings

~/.zvm/bin/zig

ZLS path settings

~/.zvm/bin/zls

ZVM updates these paths when you change the global Zig and ZLS selection. You only need to configure the paths once. If you set ZVM_PATH, replace ~/.zvm with that directory.

These fixed paths follow the global selection. With per-shell versions, zvm use changes a separate shell link. Use zvm use --global <version> to update the toolchain at the fixed paths configured in VSCode.