fork of https://github.com/dcolazin/ziggy-mode/ for latest ziggy
- Emacs Lisp 100%
| .gitignore | initial commit | |
| LICENSE | add license, link to ziggy | |
| README.md | More package installation instructions | |
| ziggy-mode.el | Correct indentation for top level structs | |
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))