Starting the REPL

Start the REPL with cider-jack-in, before evaluating any Clojure expressions.

Basic Evaluation

Load the buffer with cider-load-buffer (C-c C-k), and execute the top level form under point with cider-eval-defun-at-point (C-c C-c).

C-x C-e evaluates the form preceding point. You can also use C-c C-e which binds to the same command cider-eval-last-sexp.

Inspector

To inspect the eval result, run cider-inspect-last-result (SPC m i r in Doom).

In the inspector view, use cider-inspector-pop (L in evil mode) to return to last view, and cider-inspector-next-inspectable-object (type ] ] or g j in evil mode) to jump to next inspectable object. Use cider-inspector-next-page (C-j) to jump between pages if there are too many items.

Cheatsheet

  • M-x cider-cheatsheet-select opens minibuffer to search the cheatsheet.

Refactoring (Hydra shortcut)

hydra-cljr-help-menu (SPC m R in Doom) is a Hydra menu for quick consecutive refactoring.

  • n am adds missing libspec. It searches cljr-magic-require-namespaces for aliases.
  • p ap adds project dependency. Requires existing :deps key in deps.edn.
{:deps {}}

References