doomemacs/modules/lang/zig
Henrik Lissner 88844e9cec docs: simplify internal docs links
Fewer links means less confusion.

- Merge doom-issue and doom-commit links into doom-ref (for auto-linking
  Issue/PR/commit references).
- Merge doom-module-source and doom-docs-source links into doom-source.
- Rename doom-report-issue to doom-report.
- Use '!' as the icon for module issues link.
- Remove doom-repo (replaced with "doom:*" in :lang org module).
- Add doomdir and emacsdir links to :lang org module.
2021-11-21 20:04:28 +01:00
..
config.el Minor refactors 2021-04-14 13:30:13 -04:00
doctor.el Add :lang zig module 2021-04-05 16:21:31 +08:00
packages.el bump: :lang 2021-09-15 01:22:33 +02:00
README.org docs: simplify internal docs links 2021-11-21 20:04:28 +01:00

:lang zig

Back to module index ! Issues ↖ Github ± Suggest edits ? Help


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.

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?