Emacs
Author’s Notice
This Documentation is incomplete.
The following Emacs Variants are documented:
zig-mode
The zig-mode plugin provides syntax highlighting and automatic indentation for Zig. It can be used in combination with lsp-mode or Eglot.
lsp-mode
If you don’t have zig
or zls
in your PATH
, set the following configuration variables:
(setq lsp-zig-zls-executable "/path/to/zls_executable")
(setq lsp-zig-zig-exe-path "/path/to/zig_executable")
The available configuration are documented here.
Warning
Be aware that the configuration options may not match what is available in your installed ZLS version.
Code Actions
source.fixAll
Running source.fixall
code actions is not natively supported by lsp-mode. See emacs-lsp/lsp-mode#1842
ZLS can work around this limitation by enabling the force_autofix
config option.
source.organizeImports
Use s-l r o
to manually execute the code action.