Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Use CIDER's nREPL handler
2 files changed, 5 insertions(+), 2 deletions(-)
project.clj | 3 ++-
src/clj/myapp/core.clj | 4 +++-
modified project.clj
@@ -55,7 +55,8 @@
[ring/ring-mock "0.3.0"]
[ring/ring-devel "1.4.0"]
[pjstadig/humane-test-output "0.8.0"]]
- :plugins [[com.jakemccrary/lein-test-refresh "0.14.0"]]
+ :plugins [[com.jakemccrary/lein-test-refresh "0.14.0"]
+ [cider/cider-nrepl "0.13.0-snapshot"]]
:source-paths ["env/dev/clj" "test/clj"]
:resource-paths ["env/dev/resources"]
:repl-options {:init-ns user}
modified src/clj/myapp/core.clj
@@ -1,5 +1,6 @@
(ns myapp.core
(:require [myapp.handler :as handler]
+ [cider.nrepl :refer [cider-nrepl-handler]]
[luminus.repl-server :as repl]
[luminus.http-server :as http]
[luminus-migrations.core :as migrations]
@@ -28,7 +29,8 @@
repl-server
:start
(when-let [nrepl-port (env :nrepl-port)]
- (repl/start {:port nrepl-port}))
+ (repl/start {:port nrepl-port
+ :handler cider-nrepl-handler}))
:stop
(when repl-server
(repl/stop repl-server)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment