Fork me on GitHub

@sonelliot I'm sure there's a way, but I can't look into it right now. What exactly is your current workflow for starting the cljs repl with figwheel?


@malabarba: I have setup a dev profile with the Figwheel dependencies. I run CIDER with C-u M-x cider-jack-in and prepend with-profile +dev to the Leiningen arguments. Once the REPL is running I use the the figwheel-sidecar.repl-api to start Figwheel and the CLJS REPL. Something like (do (use 'figwheel-sidecar.repl-api) (start-figwheel!) (cljs-repl)). Hope this helps. I can put this in a Gist if that's a better format.


@sonelliot: If I understand you correct, you expecting using same REPL for clj and cljs. AFAIK, this is not working. CIDER function cider-jack-in-clojurescript creates two separate REPL session, and expect that user will use CLJ/CLJS separately. > All usual CIDER commands will be automatically directed to the appropriate REPL, depending on whether you're visiting a clj or a cljs file.


@rmuslimov: Sorry for the confusion, I am pretty new to this setup. You are right, I would like to have the two REPLs running at once. Ideally, I'd like one Emacs invocation that starts the REPLs and starts Figwheel. If I were to use cider-jack-in-clojurescript to start both REPLs and then start Figwheel afterwards, would the default Rhino REPL be compatible with Figwheel?


There was an article in figwheel’s wiki how to setup figwheel with cider’s Nrepl.


Btw, skipped this for now - and my flow is: 1. Start in terminal figwheel as: lein do clean, figwheel 2. Connect with cider-connect from emacs, and start figwheel-sidecar as you mentioned above


Not sure, that this is optimal for now. After spending hour or so on it, I found it as easiest way


I've been using the instructions in the lein-figwheel wiki quite happily, it does mean that switching between clj and cljs repls is manual but I've been ok with that. Cider's jack in for cljs does look like it should open two repls (reading the docs), but for me I've only ever had it create one


Actually, CIDER keybindings are great and allow to user forgot about REPL at all. "C-x C-e” this is how most things got executed in my case simple_smile


Ok cool, sounds like I'm using the normal approach then. I don't really shutdown/restart the REPL processes often, so it's not a big time sink or anything. I normally put a little helper function in src\clj\user.clj to launch Figwheel to save typing as well.