Other Platforms

The Problem

CIDER was created in the early days of Clojure where there weren’t any of the alternative implementation that exist today. This lead to a design that relied on knowledge of certain specifics of Clojure internal and the Clojure nREPL server.

Later, with the introduction of ClojureScript we made another set of assumptions, related to the way hosted ClojureScript works. (e.g. that you start with an ordinary Clojure REPL that gets "upgraded" to a ClojureScript REPL by the invocation of a special form)

Lately we’ve been working to address this and make CIDER more runtime-agnostic.

The Solution

As of CIDER 1.6, the default CIDER connection command cider-connect-clj is capable of connecting to any nREPL server that implements the core nREPL protocol interface.

As such, all of these work:

First start an nREPL server (the project’s Readme usually has a section on starting a nREPL server).

You can use

M-x cider-connect-clj <RET>

to connect to any Clojure(Script) nREPL server.

Features:

  • Eval, load file etc.

  • Code completion.

  • Errors as overlays. (The default CIDER error buffer is not implemented currently).

  • Other nREPL features the server provides; This might be rather minimal.

Basically you’ll get every feature that’s implemented by the nREPL server you’re using.

For nbb you can alternatively connect via cider-connect-cljs, see nbb.