1
0
Fork
You've already forked ziggy-mode
0
fork of https://github.com/dcolazin/ziggy-mode/ for latest ziggy
  • Emacs Lisp 100%
2026年07月08日 22:27:28 +00:00
.gitignore initial commit 2024年09月13日 16:23:45 -04:00
LICENSE add license, link to ziggy 2024年09月13日 16:26:02 -04:00
README.md More package installation instructions 2026年07月08日 22:15:00 +00:00
ziggy-mode.el Correct indentation for top level structs 2026年07月08日 22:27:28 +00:00

ziggy-mode.el

A tree-sitter major mode for the Ziggy data serialization and schema language.

package installation

use-package (Emacs 30 or later)

(use-package ziggy-mode
 :vc ( :url "https://codeberg.org/krl/ziggy-mode"
 :rev :newest))

straight.el

(use-package ziggy-mode
 :ensure '(:type git :host codeberg :repo "krl/ziggy-mode"))

melpa

The current ziggy-mode version on melpa is outdated

eglot lsp

to use the ziggy LSP with eglot, add the following to your configuration:

(add-to-list
 'eglot-server-programs
 '((ziggy-mode ziggy-schema-mode) . ("ziggy" "lsp")))
(add-hook 'ziggy-mode-hook 'eglot-ensure)
(add-hook 'ziggy-schema-mode-hook 'eglot-ensure)

tree sitter grammars

Ziggy mode requires tree-sitter to function, which means you need at least Emacs 29.

Additionally you need to have the grammars installed, I recommend using a proper package manager to install them. But if you must, you can use the built in emacs treesit auto-downloader to do it for you thusly:

(unless (treesit-language-available-p 'ziggy)
 (require 'treesit)
 (add-to-list 'treesit-language-source-alist
 '(ziggy "https://github.com/kristoff-it/ziggy" "main" "tree-sitter-ziggy/src" nil nil))
 (treesit-install-language-grammar 'ziggy))
(unless (treesit-language-available-p 'ziggy-schema)
 (require 'treesit)
 (add-to-list 'treesit-language-source-alist
 '(ziggy-schema "https://github.com/kristoff-it/ziggy" "main" "tree-sitter-ziggy-schema/src" nil nil))
 (treesit-install-language-grammar 'ziggy-schema))