- Add nrepl server dep to deps.edn :dev alias extra deps
org.clojure/tools.nrepl {:mvn/version "0.2.12"}
- create dev/user.clj containing the following:
(ns user
(:require [clojure.tools.nrepl.server :as nrepl]))
(defonce nrepl-server (nrepl/start-server))
(spit "./.nrepl-port" (:port nrepl-server))
- add
dev
to extra-paths under your dev alias
{:paths ["src" "resources"]
:deps {com.datomic/ion {:mvn/version "0.9.26"}
org.clojure/data.json {:mvn/version "0.2.6"}
org.clojure/clojure {:mvn/version "1.9.0"}}
:mvn/repos {"datomic-cloud" {:url "s3://datomic-releases-1fc2183a/maven/releases"}}
:aliases
{:dev {:extra-paths ["dev"]
:extra-deps {org.clojure/tools.nrepl {:mvn/version "0.2.12"}
com.datomic/client-cloud {:mvn/version "0.8.63"}
com.datomic/ion-dev {:mvn/version "0.9.176"}}}}}
Run with: clj -A:dev
to add the dev deps and paths.
Note: a simpler setup can be found here https://gist.github.com/thickey/9d30650e51dda5a0f61250291d7a39d4