Need support? Wanna help out? Join our Discord server!
The Zig Language Server (ZLS) is a tool that implements Microsoft's Language Server Protocol for Zig in Zig. In simpler terms: it'll provide you with completions, go-to definition, etc. when you write Zig code!
See the Installation Guide for editor and binary installation instructions.
Building ZLS is very easy. You will need a build of Zig master to build ZLS.
git clone https://github.com/zigtools/zls
cd zls
zig build -Doptimize=ReleaseSafe
ZLS supports most language features, including simple type function support, using namespace, payload capture type resolution, custom packages, cImport and others. Support for comptime and semantic analysis is Work-in-Progress.
The following LSP features are supported:
- Completions
- Hover
- Goto definition/declaration
- Document symbols
- Find references
- Rename symbol
- Formatting using
zig fmt
- Semantic token highlighting
- Inlay hints
- Code actions
- Selection ranges
- Folding regions
sublime-zig-language
by @prime31- Supports basic language features
- Uses data provided by
src/data
to perform builtin autocompletion
zig-lsp
by @xackus- Inspiration for ZLS
known-folders
by @ziglibs- Provides API to access known folders on Linux, Windows and Mac OS
zls
by @zigtools- Used by many ZLS developers to more efficiently work on ZLS
We'd like to take a second to thank all our awesome 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!