Lem
GitHubDiscord Matrix Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Zig

zig-mode adds Zig language support to Lem:

  • syntax highlighting, auto-indentation
  • LSP integration via zls

Syntax Highlighting

  • Keywords (fn, const, var, if, else, while, for, struct, etc.)
  • Builtin functions (@import, @sizeOf, @TypeOf, etc.)
  • Primitive types (u8, i32, bool, void, anytype, etc.)
  • Constants (true, false, null, undefined)
  • Numeric literals (hex, binary, octal, decimal, float)
  • Strings and comments (including doc comments ///)

Commands

KeyCommandDescription
C-c C-fzig-format-bufferFormat with zig fmt
C-c C-rzig-runRun with zig run
C-c C-bzig-buildBuild with zig build
C-c C-tzig-testTest with zig test

Other Features

  • Auto-indentation (4 spaces default)
  • Function navigation (beginning-of-defun/end-of-defun)
  • Electric close (}, ), ] auto-indent)

File Associations

  • .zig, .zonzig-mode