Function: zig-ts--check-grammar-compatibility
zig-ts--check-grammar-compatibility is a natively compiled function
defined in zig-ts-mode.el.
Signature
(zig-ts--check-grammar-compatibility)
Documentation
Check whether installed grammars are compatible with current zig-ts-mode.
Emit a warning if an outdated grammar is detected.
Source Code
;; Defined in /nix/store/jxyx97fhclw4jb395hn97pz60n2rh0hs-emacs-packages-deps/share/emacs/site-lisp/elpa/zig-ts-mode-20260921.1554/zig-ts-mode.el
(defun zig-ts--check-grammar-compatibility ()
"Check whether installed grammars are compatible with current `zig-ts-mode'.
Emit a warning if an outdated grammar is detected."
(unless zig-ts--grammar-compatibility-checked
(setq zig-ts--grammar-compatibility-checked t)
(when (treesit-language-available-p 'zig)
(condition-case nil
;; old tree-sitter use ValDecl
(treesit-query-compile 'zig '((variable_declaration)) t)
(error
(display-warning
'zig
(format "The installed `%s' grammar does not appear to be from \
tree-sitter-grammars. Run C-u M-x zig-ts-install-grammars to reinstall."
'zig)))))))