The Kindly-Clj Emacs package enhances your Clojure development experience by providing visualizations for Clojure code. It leverages annotations as defined by the kindly library. Currently only the following kinds are supported:
:kind/dataset
:kind/vega-lite
The processing is done by a companion Clojure library. The kindly-emacs.kindly-emacs/kindly-plot function generates visual representations of evaluated Clojure forms.
- parseedn: A Clojure library for parsing EDN (extensible data notation).
- requires Emacs built with SVG support.
Emacs buffer with two visualised forms:
I've not yet bundled this as an Emacs pakckage, so manual installation is currently required. The elisp code can be found in kindly-emacs.el
Make sure to install the required emacs-lisp library, parseedn
, before using the Kindly-Clj package.
(require 'parseedn)
Add the following to your Emacs configuration file to load the Kindly-Clj package:
(require 'kindly-clj)
To ensure that CIDER loads the required Clojure library, you can use a .dir-locals.el
file in your project. Add the following content to your project's .dir-locals.el
file:
((clojure-mode
(cider-clojure-cli-global-options . "-A:kindly-emacs")
(cider-clojure-cli-parameters . "-A:kindly-emacs")))
kindly-clj-visualise-last-sexp
: Visualize the last sexp in the current buffer.kindly-clj-visualise-region
: Visualize the selected region in the buffer.kindly-clj-visualise-defun-at-point
: Visualize the Clojure defun at point.
kindly-clj-highlight-face
: Face for previewed forms.
The kindly-clj-overlay-keymap
is active in kindly-clj overlays (highlighted regions). That means that within a form that has already been visiualised, you can use C-c C-c
to regenerate the visualization at point.
Once the package is loaded, you can use the provided functions to visualize Clojure code in your Emacs buffer. Use the defined keymap for quick interactions.
Feel free to contribute to the project by submitting issues or pull requests. Contributions are welcome!
This project is licensed under the MIT License.