-
-
Notifications
You must be signed in to change notification settings - Fork 210
Using the Figwheel REPL with Vim
Laurent Senta edited this page Nov 26, 2016
·
5 revisions
- https://github.com/tpope/vim-fireplace
- Figwheel >= 0.5.8
- Sidecar >= 0.5.8
As of v0.5.8, after following the setup guide you should have a project.clj
like:
{
:source-paths ["src/clj" "src/cljc"]
:profiles
{:dev
{:dependencies [[figwheel-sidecar "0.5.8"]
[com.cemerick/piggieback "0.2.1"]]
:source-paths ["src/cljs"]
:plugins [[lein-figwheel "0.5.8"]]}
...
}
:repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}
...
}
$ lein repl
(use 'figwheel-sidecar.repl-api)
(start-figwheel!)
Note you should have only one nREPL process starting, fireplace will connect there and create a cljs session.
Open the figwheel instance in your browser (usually localhost:3449).
It should auto-connect using the .nrepl-port
file.
You can check the connection by eval'ing (cpp
) a clojure file,
if it takes less than a second (no repl starting cost) you're good.
Use :Connect
to connect to the repl by hand.
Run the following command to connect Fireplace to the Figwheel REPL (instead of the default Rhino repl):
:Piggieback (figwheel-sidecar.repl-api/repl-env)