CIDER

CIDER Logo

CIDER is the Clojure(Script) Interactive Development Environment that Rocks!

CIDER extends Emacs with support for interactive programming in Clojure. The features are centered around cider-mode, an Emacs minor-mode that complements clojure-mode. While clojure-mode supports editing Clojure source files, cider-mode adds support for interacting with a running Clojure process for compilation, debugging, definition and documentation lookup, running tests and so on.

Inspired by SLIME

CIDER was originally inspired by the powerful Common Lisp interactive development environment SLIME. In the beginning we started by adapting SLIME’s core functionality to Clojure, but over the course of time CIDER became pretty different from SLIME in many areas. Check out this presentation if you’d like to know more about CIDER’s early history.

Overview

CIDER aims to provide an interactive development experience similar to the one you’d get when programming in Emacs Lisp, Common Lisp (with SLIME or Sly), Scheme (with Geiser) and Smalltalk.

Programmers are expected to program in a very dynamic and incremental manner, constantly re-evaluating existing Clojure definitions and adding new ones to their running applications. You never stop/start a Clojure application while using CIDER - you’re constantly interacting with it and changing it.

You can find more details about the typical CIDER workflow in the Interactive Programming section. While we’re a bit short on video tutorials, you can check out this into to CIDER to get a feel about what do we mean by an "Interactive Development Environment".

CIDER’s built on top of nREPL, the Clojure networked REPL server.

CIDER’s basic architecture looks something like this:

cider architecture

Clojure code gets executed by an nREPL server. CIDER sends requests to the server and processes its responses. The server’s functionality is augmented by additional nREPL middleware, designed specifically to address the needs of an interactive development environment like CIDER.

An Editor-agnostic Foundation

Much of the nREPL middleware we originally developed for CIDER is editor-agnostic and is being used by other Clojure development environments as well (e.g. vim-fireplace & Calva).

Features

CIDER packs plenty of features. Here are some of them (in no particular order):

  • Interactive code evaluation

  • Powerful REPL

  • Code completion

  • Code reloading

  • Definition & documentation lookup

  • Enhanced error reporting

  • clojure.test integration

  • clojure.spec integration

  • Interactive debugger

  • ClojureScript support

And many many more…​ The rest of this manual will be exploring CIDER’s features in great detail.

CIDER in Action

Below you can see a typical CIDER session.

CIDER Screenshot

Here the user checked the documentation for clojure.core/merge straight from the source buffer and then jumped to a REPL buffer to try out something there.