cue-ts-mode
is an Emacs major mode that provides font-lock and
indentation support for the CUE Data Constraint Language, powered by
the tree-sitter-cue
grammar.
This major mode is still in-progress, any feedback and contributions are welcome.
This package requires Emacs 29 or later, built with tree-sitter
support. Your distribution of choice should already provide pre-built
Emacs binaries with tree-sitter support built-in (otherwise, you can
build it from source, preferably from the emacs-29
branch). To
check if your Emacs supports tree-sitter, evaluate the following:
(treesit-available-p)
If it returns t
, then your Emacs should have tree-sitter support
built-in.
You need to install a tree-sitter grammar for this package to work.
You can do so with treesit-install-language-grammar
:
(cl-pushnew '(cue "https://github.com/eonpatapon/tree-sitter-cue")
treesit-language-source-alist :test 'equal)
(treesit-install-language-grammar 'cue)
(package-vc-install "https://github.com/ZharMeny/cue-ts-mode.git")
;; Since Emacs 30, use-package has the :vc keyword
(use-package cue-ts-mode
:vc (:url "https://github.com/ZharMeny/cue-ts-mode.git" :rev :newest))