doomemacs/modules/lang/zig
Henrik Lissner 1abcf913aa
revert: fix(docs): set mode in file-local vars
emacs-straight/org-mode@e22b4eb7aa introduced a breaking change that
made it impossible to rely on .dir-locals.el to change org-mode buffers
in $EMACSDIR to doom-docs-org-mode (without infinite recursion), so we
used file-local variables in 7e400ab.

emacs-straight/org-mode@215de6176b reverted that change, so we can use
.dir-locals.el again, and this is my preference, since it requires less
boilerplate across our hundreds of org files.

Ref: emacs-straight/org-mode@215de6176b
Ref: emacs-straight/org-mode@e22b4eb7aa
Revert: 7e400abdc0
2022-08-07 19:08:07 +02:00
..
config.el refactor(:lang): move tree-sitter init 2022-07-25 17:34:44 +02:00
doctor.el docs(tree-sitter): add doc checks for langs 2022-06-17 20:08:42 +01:00
packages.el bump: :lang 2022-03-31 21:09:38 +02:00
README.org revert: fix(docs): set mode in file-local vars 2022-08-07 19:08:07 +02:00

:lang zig

Description   unfold

This module adds Zig support, with optional (but recommended) LSP support via zls.

  • Syntax highlighting
  • Syntax-checking (flycheck)
  • Code completion and LSP integration (zls)

Module flags

+lsp
Enables integration for the zls LSP server. It is highly recommended you use this.
+tree-sitter
Leverages tree-sitter for better syntax highlighting and structural text editing. Requires :tools tree-sitter.

Packages

Hacks

No hacks documented for this module.

TODO Changelog

This module does not have a changelog yet.

Installation

Enable this module in your doom! block.

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,

TODO Usage

🔨 This module's usage documentation is incomplete. Complete it?

LSP support

This module supports LSP integration. For it to work you'll need:

  1. zls installed,
  2. The :tools lsp module enabled. Only lsp-mode is supported for now,
  3. The +lsp flag 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

TODO Configuration

🔨 This module's configuration documentation is incomplete. Complete it?

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")

Troubleshooting

There are no known problems with this module. Report one?

Frequently asked questions

This module has no FAQs yet. Ask one?

TODO Appendix

🔨 This module has no appendix yet. Write one?