Variable: zig-ts-mode-abbrev-table
zig-ts-mode-abbrev-table is a variable defined in zig-ts-mode.el.
Value
#<obarray n=1>
Documentation
Abbrev table for zig-ts-mode.
Source Code
;; Defined in /nix/store/jxyx97fhclw4jb395hn97pz60n2rh0hs-emacs-packages-deps/share/emacs/site-lisp/elpa/zig-ts-mode-20260921.1554/zig-ts-mode.el
;;;###autoload
(define-derived-mode zig-ts-mode prog-mode "Zig"
"Major mode for editing Zig, powered by tree-sitter."
:group 'zig-ts
:syntax-table zig-ts--syntax-table
(setq-local indent-tabs-mode nil)
(when-let* ((missing (seq-filter (lambda (r)
(not (treesit-language-available-p (car r))))
zig-ts-grammar-recipes)))
(when (y-or-n-p "Zig tree-sitter grammars are not installed yet. Install now?")
(zig-ts-install-grammars)))
;; Warn if installed grammars are outdated
(zig-ts--check-grammar-compatibility)
;; Compile
(setq-local compile-command (concat (shell-quote-argument zig-ts-zig-bin) " build"))
;; Comment
(setq-local comment-start "// ")
(setq-local comment-end "")
(setq-local comment-start-skip (rx (group (seq "/" (+ "/")))
(* (syntax whitespace))))
(setq-local comment-end-skip (rx (* (syntax whitespace))
(group (syntax comment-end))))
(setq-local comment-line-break-function #'zig-ts--comment-indent-new-line)
;; Electric indentation on delimiters
(setq-local electric-indent-chars
(append "{}()[].,;" electric-indent-chars))
;; Fill paragraph
(setq-local paragraph-start
(rx (or (seq (* (syntax whitespace))
(group (* (seq "/" (+ "/"))))
(* (syntax whitespace))
eol)
"\f")))
(setq-local paragraph-separate paragraph-start)
(setq-local adaptive-fill-mode t)
(when (treesit-ready-p 'zig)
(treesit-parser-create 'zig)
(setq-local syntax-propertize-function #'zig-ts--syntax-propertize)
(add-hook 'syntax-propertize-extend-region-functions
#'syntax-propertize-wholelines nil t)
;; Fill paragraph with tree-sitter feature
(setq-local fill-paragraph-function #'zig-ts--fill-paragraph)
;; Font-lock
(setq-local treesit-font-lock-settings zig-ts--font-lock-settings)
(setq-local treesit-font-lock-feature-list zig-ts--font-lock-feature-list)
;; Indentation
(setq-local treesit-simple-indent-rules zig-ts--indent-rules)
;; Navigation
(setq-local treesit-simple-imenu-settings zig-ts--imenu-settings)
(setq-local treesit-thing-settings zig-ts--thing-settings)
;; Defun
(setq-local treesit-defun-name-function #'zig-ts--defun-name)
(setq-local treesit-defun-type-regexp zig-ts--defun-type-regexp)
(treesit-major-mode-setup)))