1
0
Fork
You've already forked zig-ts-mode
0
Emacs Zig Tree Sitter Mode
  • Emacs Lisp 68.6%
  • Zig 30.4%
  • Just 1%
2026年01月23日 03:42:45 +01:00
test feat!: follow new zig grammar at https://github.com/tree-sitter-grammars/tree-sitter-zig 2025年12月21日 23:17:33 +08:00
.gitignore init 2024年09月09日 20:58:31 +08:00
justfile init 2024年09月09日 20:58:31 +08:00
README.md add readme section to install from vc 2025年12月26日 02:36:16 +03:00
zig-ts-mode.el fixes syntax error with eq? and match? 2026年01月22日 08:45:39 -05:00

Zig Tree Sitter Mode

Official repository is at CodeBerg: meow_king/zig-ts-mode.

Target zig tree sitter grammar: github:tree-sitter-grammars/tree-sitter-zig (commit: 6479aa13f32f701c383083d8b28360ebd682fb7d)

Example configuration to manage Zig tree sitter garmmar:

(setq treesit-language-source-alist
 '((zig "https://github.com/tree-sitter-grammars/tree-sitter-zig")))

(Note, M-x treesit-install-language-grammar to install the Zig tree sitter grammar)

Tested on Emacs 30 and master branch.


Currently I don't write Zig. If you'd like to help maintain or take over this project, please contact me. Thank you!

Installation

From a version control (Emacs 30 or later)

(use-package zig-ts-mode
 :vc (:url "https://codeberg.org/meow_king/zig-ts-mode"
 :rev :newest))

Elpaca

(use-package zig-ts-mode
 :ensure (:type git :host codeberg :repo "meow_king/zig-ts-mode"))

Straight

(use-package zig-ts-mode
 :ensure '(:type git :host codeberg :repo "meow_king/zig-ts-mode"))

Configuration

Automatically enter zig-ts-mode:

(add-to-list 'auto-mode-alist '("\\.zig\\(?:\\.zon\\)?\\'" . zig-ts-mode))