Miscellaneous Configuration

Overlays

When you evaluate code in Clojure files, the result is displayed in the buffer itself, in an overlay right after the evaluated code. If you want this overlay to be font-locked (syntax-highlighted) like Clojure code, set the following variable.

(setq cider-overlays-use-font-lock t)

You can disable overlays entirely (and display results in the echo-area at the bottom) with the cider-use-overlays variable.

(setq cider-use-overlays nil)

By default, result overlays are displayed at the end of the line. You can set the variable cider-result-overlay-position to display results at the end of their respective forms instead. Note that this also affects the position of debugger overlays.

(setq cider-result-overlay-position 'at-point)

Minibuffer completion

Out-of-the box, CIDER uses the standard completing-read Emacs mechanism. While it’s not fancy it certainly gets the job done (just press TAB). There are, however, ways to improve upon the standard completion if you wish to.

icomplete

icomplete is bundled with Emacs and enhances the default minibuffer completion:

(require 'icomplete)

You can learn more about icomplete here.

ido

ido is also bundled with Emacs and offers more features than icomplete. If you are using ido, be sure to use both ido-everywhere and ido-completing-read+. You might also want to install ido-flex.

If you’re fine with installing a third-party package for enhanced minibuffer completion you can’t go wrong with the modern and versatile ivy.