doomemacs/modules/lang/zig
Henrik Lissner 037b018cdd
feat: add .doommodule files
These optional dotfiles indicate the root of a module or module
group (:lang), and will later contain module metadata. They will also
serve as an alternative to packages.el and doctor.el, and will aide the
parts of the v3.0 module API concerned with resolving the current module
from a path (`doom-module-from-path`), which currently rely too heavily
on parsing path strings.

For now, however, they're simply placeholders.
2024-09-14 20:47:39 -04:00
..
.doommodule feat: add .doommodule files 2024-09-14 20:47:39 -04:00
config.el nit: add deprecation comments for projectile config 2024-08-09 20:42:33 -04:00
doctor.el fix(zig): correct doctor check 2023-09-13 20:21:08 +01:00
packages.el bump: :lang emacs-lisp scheme web zig 2024-06-03 16:22:09 -04:00
README.org docs(*): replace all-the-icons with nerd-icons 2023-09-16 20:19:11 +02:00

:lang zig

Description   unfold

This module adds Zig support, with optional (but recommended) LSP support via 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 doom-module::tools tree-sitter.

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 doom-module::tools lsp module enabled. Only doom-package:lsp-mode is supported for now,
  3. The doom-module:+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?