Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document using CIDER with Fighweel #1427

Closed
expez opened this issue Nov 19, 2015 · 8 comments
Closed

Document using CIDER with Fighweel #1427

expez opened this issue Nov 19, 2015 · 8 comments

Comments

@expez
Copy link
Member

expez commented Nov 19, 2015

Figwheel is super popular awesomesauce but its usage with CIDER is somewhat unintuitive

How to make this work is documented over at fighweel here but the information is somewhat hard to find.

At least one of our users ran into this: clojure-emacs/cider-nrepl#272

@bbatsov
Copy link
Member

bbatsov commented Nov 19, 2015

Guess we can simply link to this from our README.

@bbatsov
Copy link
Member

bbatsov commented Nov 26, 2015

@expez The documentation was moved. Any idea where to?

@bbatsov
Copy link
Member

bbatsov commented Nov 26, 2015

@Naomarik
Copy link
Contributor

FWIW I still couldn't get it working with those docs, but that could be just me. If someone had an alternate/simplified version of this it might help others get going in the future.

@expez
Copy link
Member Author

expez commented Dec 10, 2015

FWIW I still couldn't get it working with those docs, but that could be just me.

Most likely this isn't just you. There are a lot of moving parts involved in getting a clj environment going for emacs these days...

If someone had an alternate/simplified version of this it might help others get going in the future.

Pull-request welcome after you've asked someone in the know on #clojure, on freenode, or clojurians, on slack, and gotten it working ;)

@ghost
Copy link

ghost commented Dec 10, 2015

I've gotten figwheel working with the following setup, currently:

profiles.clj:

{:repl
 {:dependencies [[org.clojure/tools.nrepl "0.2.12"]
                 [com.cemerick/piggieback "0.2.1"]
                 [figwheel-sidecar "0.5.0-2"]]     ;; <-- important
  :plugins [[cider/cider-nrepl "0.11.0-SNAPSHOT"]]
  :repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}}}

project.clj (must be under root, not under a separate profile. The reason for this is that since figwheel is not running from the lein context, it will only read project.clj, not merge anything):

:figwheel { ... custom settings ... }
:cljsbuild { ... :figwheel {:on-jsload "name.space/func"} ... rest of build }

Customize the cider-cljs-repl cider-cljs-lein-repl variable:

'(cider-cljs-lein-repl
  "(do (use 'figwheel-sidecar.repl-api) (start-figwheel!) (cljs-repl))")

edit: Appears that variable was changed yesterday.

If interested, I could create a minimal working example for the documentation. Perhaps figwheel could be added to the default cljs repls, alongside rhino, weasel.

@ghost
Copy link

ghost commented Dec 10, 2015

As a side note, this only works with cider-jack-in-clojurescript (so that it runs cider-cljs-repl commands and evaluates your .cljs files to the correct process), and won't work with any variant of cider-connect that I'm aware.

@bbatsov bbatsov modified the milestone: v0.11 Dec 11, 2015
@Malabarba Malabarba modified the milestones: v0.11, The UX release (v0.12?) Feb 14, 2016
@bbatsov
Copy link
Member

bbatsov commented Mar 1, 2016

@magnars recently documented this.

@bbatsov bbatsov closed this as completed Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants