summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorBozhidar Batsov <bozhidar.batsov@gmail.com>2016-02-21 08:50:20 +0100
committerBozhidar Batsov <bozhidar.batsov@gmail.com>2016-02-21 08:50:20 +0100
commit56a512f377ccd0b456e9f01bf32684d8cd10a271 (patch)
treef1a3d3a578db24d79673f605362f4e7d081a074f /README.md
parent8658c5023fe708dfa644a097b843f08d51af085a (diff)
parent5d62de6c6380e76e6cb0435c5d7f56260566f66c (diff)
Merge pull request #1581 from magnars/patch-1
Add instructions for using Figwheel with jack-in
Diffstat (limited to 'README.md')
-rw-r--r--README.md33
1 files changed, 33 insertions, 0 deletions
diff --git a/README.md b/README.md
index fff14cb3..63d75748 100644
--- a/README.md
+++ b/README.md
@@ -694,6 +694,39 @@ documentation lookup, the namespace browser, and macroexpansion).
For more information visit [boot-cljs-repl](https://github.com/adzerk-oss/boot-cljs-repl).
+#### Using the Figwheel REPL with CIDER
+
+You can also use [https://github.com/bhauman/lein-figwheel](Figwheel) with CIDER.
+
+1. Set up Figwheel as normal, but make sure `:cljsbuild` and `:figwheel` settings are
+ in the root of your Leiningen project definition.
+
+2. Add these to your dev `:dependencies`:
+
+ ```clojure
+ [com.cemerick/piggieback "0.2.1"]
+ [figwheel-sidecar "0.5.0-2"]
+ ```
+
+3. Add this to your dev `:repl-options`:
+
+ ```clojure
+ :nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]
+ ```
+
+4. Instruct CIDER to use Figwheel in your Emacs config:
+
+ ```cl
+ (setq cider-cljs-lein-repl "(do (use 'figwheel-sidecar.repl-api) (start-figwheel!) (cljs-repl))")
+ ```
+
+5. Start the REPL with `cider-jack-in-clojurescript` (`C-c M-J`)
+
+6. Open a browser to the Figwheel URL so that it can connect to your application.
+
+You now have two nREPL connections, one for Clojure and one for ClojureScript.
+CIDER will determine which to use based on the type of file you're editing.
+
## Extended workflow
CIDER packs a ton of extra functionality, besides basic Clojure code