Most Clojure developers using Emacs tend to use Cider. Cider needs the Clojure instance to be running nRepl
, but Planck doesn't support that. Planck does instead implement the new Socket REPL capability, but Cider doesn't know how to interact with that.
Luckily for us, Rich Hickey thinks Cider is too complex, so Bozhidar Batsov went ahead and created inf-clojure.
To set up inf-clojure
to run with Planck, you can follow the instructions here and add
(setq inf-clojure-program "planck")
to your .emacs
file, given planck
is on your path. I would be careful doing
(add-hook 'clojure-mode-hook #'inf-clojure-minor-mode)
if you use Cider for your other Clojure work, and rather invokeinf-clojure
by M-x inf-clojure-minor-mode
when you're working with Planck.You can now evaluate code directly from your source-code buffer by pressing C-x C-e
after the form you want to execute.