There are many additional Emacs packages that can enhance your Clojure programming
experience. The majority of the minor modes listed here should be enabled for both
clojure-mode for optimal effects.
clr-refactor builds on top of clojure-mode and CIDER and adds a ton of extra functionality (e.g. the ability to thread/unthread expression, find and replace usages, introduce let bindings, extract function and so on).
A full list of features is available here.
We hope to incorporate some of its features into clojure-mode and CIDER themselves down the road.
Make sure that the version of
clj-refactor you've installed is compatible with
your CIDER version.
helm-cider provides Helm
interface for certain CIDER commands (e.g.
cider-hydra provides a nice way to navigate groups of related CIDER commands.
You can think of it as a fancier which-key.
sayid is a powerful alternative of CIDER's built-in basic tracing functionality.
This package provides basic interaction with a Clojure subprocess (REPL). It's based on ideas from the popular inferior-lisp package.
inf-clojure has two components -
a nice Clojure REPL with auto-completion and a minor mode
inf-clojure-minor-mode), which extends clojure-mode with commands to evaluate
forms directly in the REPL.
It's basically a simple alternative of CIDER, which provides a subset of CIDER's functionality.
CamelCase support for editing commands(like
backward-word, etc) in the REPL is quite useful since
we often have to deal with Java class and method names. The built-in
Emacs minor mode
subword-mode provides such functionality:
(add-hook 'cider-repl-mode-hook #'subword-mode)
The use of paredit
when editing Clojure (or any other Lisp) code is highly
recommended. You're probably using it already in your
buffers (if you're not you probably should). You might also want to
paredit in the REPL buffer as well:
(add-hook 'cider-repl-mode-hook #'paredit-mode)
smartparens is an excellent alternative
to paredit. Many Clojure hackers have adopted it recently and you might want
to give it a try as well. To enable
smartparens in the REPL buffer use the
(add-hook 'cider-repl-mode-hook #'smartparens-strict-mode)
RainbowDelimiters is a minor mode which highlights parentheses, brackets, and braces according to their depth. Each successive level is highlighted in a different color. This makes it easy to spot matching delimiters, orient yourself in the code, and tell which statements are at a given depth. Assuming you've already installed RainbowDelimiters you can enable it in the REPL like this:
(add-hook 'cider-repl-mode-hook #'rainbow-delimiters-mode)