Skip to content

Instantly share code, notes, and snippets.

@vermiculus
Created April 30, 2016 18:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vermiculus/0ca65d65e260fbb2473a0547b02f7637 to your computer and use it in GitHub Desktop.
Save vermiculus/0ca65d65e260fbb2473a0547b02f7637 to your computer and use it in GitHub Desktop.
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