Note: you must have Cider version 0.18.*
In deps.edn
{:paths ["src" "resources"]
:deps {org.clojure/clojure {:mvn/version "1.9.0"}}
:aliases
{:cider-clj {:extra-deps {org.clojure/clojure {:mvn/version "1.9.0"}
cider/cider-nrepl {:mvn/version "0.18.0"}}
:main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]}}}
In Emacs:
(setq cider-clojure-cli-global-options "-R:cider-clj")
Now cider-jack-in
will launch nrepl and connect.
(defproject day-of-datomic "0.1.0-SNAPSHOT"
:plugins [[lein-tools-deps "0.4.1"]]
:middleware [lein-tools-deps.plugin/resolve-dependencies-with-deps-edn]
:lein-tools-deps/config {:config-files [:install :user :project]})
Note: now you remove the :dependencies
key, as they are all in your deps.edn
file
Follow the above snippets for this simple stuff.
If you want to launch nrepl
server yourself, you can do this but I wanted less steps.
There is also an inf-clojure
package which understands tools.deps
if you want something closer to inferior-lisp
.