Connect to a running Replλ︎
You can connect to a REPL started elsewhere, for example the command line with
lein repl, then connect to it from inside Spacemacs. You will need to know:
- host name / ip address
- port the repl is listening too
SPC m s c
M-RET s c
, s c
lein repl command to run a new REPL on the command line. Then connect to that REPL using
If you are going to connect to an external repl from Spacemacs, you will need to add the Leiningen plugin called
cider-nrepl and the Clojure
tools.nrepl library. Rather than add this to all projects, you add these to your Leiningen configuration
~/.lein/profiles.clj file. The versions of each library also had to be kept in sync with updates in the Spacemacs Clojure layer.
Without this configuration, you will see warning messages in the repl buffer stating that the versions of ... are out of sync.