Skip to content

Latest commit

 

History

History
66 lines (53 loc) · 2 KB

README.org

File metadata and controls

66 lines (53 loc) · 2 KB

lang/zig

Table of Contents

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

Module Flags

  • +lsp Enables 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:

  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

BindingDescription
<localleader> bzig-compile
<localleader> fzig-format-buffer
<localleader> rzig-run
<localleader> tzig-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")