mirror of
https://github.com/doomemacs/doomemacs.git
synced 2025-12-06 02:30:33 -08:00
2 KiB
2 KiB
lang/zig
Description
This module adds Zig support, with optional (but recommended) LSP support via zls.
- Syntax highlighting
- Syntax-checking (
flycheck) - Code completion and LSP integration (
zls)
Maintainers
- @bnjmnt4n (Author)
Module Flags
+lspEnables integration for the zls LSP server. It is highly recommended you use this.
Plugins
Prerequisites
To get started with Zig, you need the zig tool. Pre-built binaries for most
systems are available for download from https://ziglang.org/download/ or from
system package managers.
zls is a language server for Zig, which provides code completion,
Features
LSP support
This module supports LSP integration. For it to work you'll need:
- zls installed.
- The
:tools lspmodule enabled. Onlylsp-modeis supported for now. - The
+lspflag on this module enabled.
Keybinds
| Binding | Description |
|---|---|
<localleader> b |
zig-compile |
<localleader> f |
zig-format-buffer |
<localleader> r |
zig-run |
<localleader> t |
zig-test-buffer |
Configuration
Customize zls path
To customize the path of the zls executable, modify lsp-zig-zls-executable.
;; in $DOOMDIR/config.el
(setq lsp-zig-zls-executable "~/path/to/zls")