@@ -478,126 +478,169 @@ <h3 id="using-leiningen"><a class="anchor" href="#using-leiningen"></a>Using Lei
478478</ div >
479479< div class ="listingblock ">
480480< div class ="content ">
481- < pre class ="highlightjs highlight "> < code class ="language-clojure hljs " data-lang ="clojure "> {:repl {:plugins [[cider/cider-nrepl "0.36.1"]]}}
482-
483- WARNING: Be careful not to place this in the `:user` profile, as this way CIDER's
484- middleware will always get loaded, causing `lein` to start slower. You really
485- need it just for `lein repl` and this is what the `:repl` profile is for.
486-
487- === Using Boot
488-
489- NOTE: Make sure you're using Boot 2.8.3 or newer, as 2.8.3 is the first
490- release to ship with nREPL 0.6.
491-
492- Boot users can configure the tool to include the middleware automatically in
493- all of their projects using a `~/.boot/profile.boot` file like so:
494-
495- [source,clojure]</ code > </ pre >
481+ < pre class ="highlightjs highlight "> < code class ="language-clojure hljs " data-lang ="clojure "> {:repl {:plugins [[cider/cider-nrepl "0.36.1"]]}}</ code > </ pre >
496482</ div >
497483</ div >
498- < div class ="paragraph ">
499- < p > (require 'boot.repl)</ p >
484+ < div class ="admonitionblock warning ">
485+ < table >
486+ < tr >
487+ < td class ="icon ">
488+ < i class ="fa icon-warning " title ="Warning "> </ i >
489+ </ td >
490+ < td class ="content ">
491+ Be careful not to place this in the < code > :user</ code > profile, as this way CIDER’s
492+ middleware will always get loaded, causing < code > lein</ code > to start slower. You really
493+ need it just for < code > lein repl</ code > and this is what the < code > :repl</ code > profile is for.
494+ </ td >
495+ </ tr >
496+ </ table >
500497</ div >
501- < div class ="paragraph ">
502- < p > (swap! boot.repl/< strong > default-dependencies</ strong >
503- concat '[[cider/cider-nrepl "0.36.1"]])</ p >
498+ </ div >
499+ < div class ="sect2 ">
500+ < h3 id ="using-boot "> < a class ="anchor " href ="#using-boot "> </ a > Using Boot</ h3 >
501+ < div class ="admonitionblock note ">
502+ < table >
503+ < tr >
504+ < td class ="icon ">
505+ < i class ="fa icon-note " title ="Note "> </ i >
506+ </ td >
507+ < td class ="content ">
508+ Make sure you’re using Boot 2.8.3 or newer, as 2.8.3 is the first
509+ release to ship with nREPL 0.6.
510+ </ td >
511+ </ tr >
512+ </ table >
504513</ div >
505514< div class ="paragraph ">
506- < p > (swap! boot.repl/ < strong > default- middleware</ strong >
507- conj 'cider.nrepl/cider-middleware) </ p >
515+ < p > Boot users can configure the tool to include the middleware automatically in
516+ all of their projects using a < code > ~/.boot/profile.boot </ code > file like so: </ p >
508517</ div >
509518< div class ="listingblock ">
510519< div class ="content ">
511- < pre > For more information visit https://github.com/boot-clj/boot/wiki/Cider-REPL[boot-clj wiki].
520+ < pre class =" highlightjs highlight " > < code class =" language-clojure hljs " data-lang =" clojure " > (require 'boot.repl)
512521
513- === Using tools.deps
522+ (swap! boot.repl/*default-dependencies*
523+ concat '[[cider/cider-nrepl "0.36.1"]])
514524
515- You can add the following aliases to your deps.edn in order to launch
516- a standalone Clojure(Script) nREPL server with CIDER middleware from
517- the commandline with something like `clj -A:cider-clj`. Then from emacs
518- run `cider-connect` or `cider-connect-cljs`.
519-
520- [source,clojure]</ pre >
521- </ div >
525+ (swap! boot.repl/*default-middleware*
526+ conj 'cider.nrepl/cider-middleware)</ code > </ pre >
522527</ div >
523- < div class ="literalblock ">
524- < div class ="content ">
525- < pre > :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.36.1"}}
526- :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]}</ pre >
527528</ div >
529+ < div class ="paragraph ">
530+ < p > For more information visit < a href ="https://github.com/boot-clj/boot/wiki/Cider-REPL "> boot-clj wiki</ a > .</ p >
528531</ div >
529- < div class ="literalblock ">
530- < div class ="content ">
531- < pre > :cider-cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.339"}
532- cider/cider-nrepl {:mvn/version "0.36.1"}
533- cider/piggieback {:mvn/version "0.5.3"}}
534- :main-opts ["-m" "nrepl.cmdline" "--middleware"
535- "[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]}</ pre >
536532</ div >
533+ < div class ="sect2 ">
534+ < h3 id ="using-tools-deps "> < a class ="anchor " href ="#using-tools-deps "> </ a > Using tools.deps</ h3 >
535+ < div class ="paragraph ">
536+ < p > You can add the following aliases to your deps.edn in order to launch
537+ a standalone Clojure(Script) nREPL server with CIDER middleware from
538+ the commandline with something like < code > clj -A:cider-clj</ code > . Then from emacs
539+ run < code > cider-connect</ code > or < code > cider-connect-cljs</ code > .</ p >
537540</ div >
538541< div class ="listingblock ">
539542< div class ="content ">
540- < pre > === Using Gradle
541-
542- NOTE: Make sure you're using https://github.com/clojurephant/clojurephant[Clojurephant] 0.4.0 or newer.
543+ < pre class ="highlightjs highlight "> < code class ="language-clojure hljs " data-lang ="clojure "> :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.36.1"}}
544+ :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]}
543545
544- .build.gradle
545- [source, groovy]</ pre >
546+ :cider-cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.339"}
547+ cider/cider-nrepl {:mvn/version "0.36.1"}
548+ cider/piggieback {:mvn/version "0.5.3"}}
549+ :main-opts ["-m" "nrepl.cmdline" "--middleware"
550+ "[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]}</ code > </ pre >
546551</ div >
547552</ div >
548- < div class ="paragraph ">
549- < p > dependencies {
550- devImplementation 'nrepl:nrepl:0.9.0'
551- devImplementation 'cider:cider-nrepl:0.28.5'
552- }</ p >
553553</ div >
554- < div class ="paragraph ">
555- < p > tasks.named('clojureRepl') {
556- middleware = ['cider.nrepl/cider-middleware']
557- }</ p >
554+ < div class ="sect2 ">
555+ < h3 id ="using-gradle "> < a class ="anchor " href ="#using-gradle "> </ a > Using Gradle</ h3 >
556+ < div class ="admonitionblock note ">
557+ < table >
558+ < tr >
559+ < td class ="icon ">
560+ < i class ="fa icon-note " title ="Note "> </ i >
561+ </ td >
562+ < td class ="content ">
563+ Make sure you’re using < a href ="https://github.com/clojurephant/clojurephant "> Clojurephant</ a > 0.4.0 or newer.
564+ </ td >
565+ </ tr >
566+ </ table >
558567</ div >
559568< div class ="listingblock ">
569+ < div class ="title "> build.gradle</ div >
560570< div class ="content ">
561- < pre > You can then launch the nREPL server from the command line via: `./gradlew clojureRepl`.
562-
563- For more information, see the https://clojurephant.dev[Clojurephant docs].
564-
565- === Using Maven
566-
567- NOTE: This section is currently a stub. Contributions welcome!
568-
569- == Using Embedded nREPL Server
570-
571- If you're embedding nREPL in your application, you'll have to start the
572- server with CIDER's own nREPL handler.
571+ < pre class ="highlightjs highlight "> < code class ="language-groovy hljs " data-lang ="groovy "> dependencies {
572+ devImplementation 'nrepl:nrepl:0.9.0'
573+ devImplementation 'cider:cider-nrepl:0.28.5'
574+ }
573575
574- [source,clojure]</ pre >
576+ tasks.named('clojureRepl') {
577+ middleware = ['cider.nrepl/cider-middleware']
578+ }</ code > </ pre >
575579</ div >
576580</ div >
577581< div class ="paragraph ">
578- < p > (ns my-app
579- (:require [nrepl.server :as nrepl-server]
580- [cider.nrepl :refer (cider-nrepl-handler)]))</ p >
582+ < p > You can then launch the nREPL server from the command line via: < code > ./gradlew clojureRepl</ code > .</ p >
581583</ div >
582584< div class ="paragraph ">
583- < p > (defn -main
584- []
585- (nrepl-server/start-server :port 7888 :handler cider-nrepl-handler))</ p >
585+ < p > For more information, see the < a href ="https://clojurephant.dev "> Clojurephant docs</ a > .</ p >
586+ </ div >
587+ </ div >
588+ < div class ="sect2 ">
589+ < h3 id ="using-maven "> < a class ="anchor " href ="#using-maven "> </ a > Using Maven</ h3 >
590+ < div class ="admonitionblock note ">
591+ < table >
592+ < tr >
593+ < td class ="icon ">
594+ < i class ="fa icon-note " title ="Note "> </ i >
595+ </ td >
596+ < td class ="content ">
597+ This section is currently a stub. Contributions welcome!
598+ </ td >
599+ </ tr >
600+ </ table >
601+ </ div >
602+ </ div >
603+ </ div >
604+ </ div >
605+ < div class ="sect1 ">
606+ < h2 id ="using-embedded-nrepl-server "> < a class ="anchor " href ="#using-embedded-nrepl-server "> </ a > Using Embedded nREPL Server</ h2 >
607+ < div class ="sectionbody ">
608+ < div class ="paragraph ">
609+ < p > If you’re embedding nREPL in your application, you’ll have to start the
610+ server with CIDER’s own nREPL handler.</ p >
586611</ div >
587612< div class ="listingblock ">
588613< div class ="content ">
589- < pre > It goes without saying that your project should depend on `cider-nrepl`.
614+ < pre class ="highlightjs highlight "> < code class ="language-clojure hljs " data-lang ="clojure "> (ns my-app
615+ (:require [nrepl.server :as nrepl-server]
616+ [cider.nrepl :refer (cider-nrepl-handler)]))
590617
591- NOTE: Prior to CIDER 0.18, CIDER and cider-nrepl were always released together
618+ (defn -main
619+ []
620+ (nrepl-server/start-server :port 7888 :handler cider-nrepl-handler))</ code > </ pre >
621+ </ div >
622+ </ div >
623+ < div class ="paragraph ">
624+ < p > It goes without saying that your project should depend on < code > cider-nrepl</ code > .</ p >
625+ </ div >
626+ < div class ="admonitionblock note ">
627+ < table >
628+ < tr >
629+ < td class ="icon ">
630+ < i class ="fa icon-note " title ="Note "> </ i >
631+ </ td >
632+ < td class ="content ">
633+ Prior to CIDER 0.18, CIDER and cider-nrepl were always released together
592634and their versions had to match for things to work (e.g. CIDER 0.15 required
593635cider-nrepl 0.15). But as the prominence of cider-nrepl grew and many other
594636tools started using it, the two projects evolved separately and are no longer in
595637tight lock-step. Usually, any recent version of cider-nrepl should be (mostly)
596638compatible with a recent version of CIDER. You can check the required version of
597639cider-nrepl for your version of CIDER by looking at
598- `cider-required-middleware-version`.</ pre >
599- </ div >
600- </ div >
640+ < code > cider-required-middleware-version</ code > .
641+ </ td >
642+ </ tr >
643+ </ table >
601644</ div >
602645</ div >
603646</ div >
0 commit comments