Skip to content

Latest commit

 

History

History
38 lines (32 loc) · 1.34 KB

README.org

File metadata and controls

38 lines (32 loc) · 1.34 KB

cue-ts-mode

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.

Tree-sitter setup

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.

Tree-sitter grammar

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)

Installation

(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))