Fork me on GitHub
#figwheel
<
2018-06-16
>
bhauman03:06:40

@chadhs you start this from Cider by doing cider-jack-in-clojurescript

chadhs03:06:19

Everything fires up except the ring server; must be missing something small

bhauman03:06:05

if you have a cider connection then you have a ring server right?

bhauman03:06:21

oh RING server

bhauman03:06:34

been travelling all day

bhauman03:06:13

OK you are using the separate server setup

chadhs13:06:18

@U064J0EFR if you scroll down just a bit, i do have the block required to properly kick off figwheel with cider-jack-in-clojurescript, and it works great for typical figwheel dev. https://github.com/chadhs/dotfiles/blob/master/editors/emacs-config.org#clojure-support

chadhs13:06:51

but i still can’t get your example or my project to kick off the ring-server automatically via cider despite having https://github.com/chadhs/ccclock/blob/e6affbf62adc4e0f4f0b0ddded56e33e04451c9c/project.clj#L31

chadhs13:06:13

it does work with lein figwheel

bhauman20:06:36

@chadhs yep as you discovered this only works from lein 😞

bhauman20:06:22

what happened is the landscape changed, is used to only make sense to provide these hooks to lein because if you were starting figwheel from a script why not just call your server init function as well

bhauman20:06:32

but now with the way that CIDER works with clojurescript it would be a good thing to support this from figwheel/start as well

bhauman20:06:10

I would suggest form now just starting your server from the script that launches your figwheel

bhauman20:06:40

In fact I really think the best pattern is to have a function in user called (defn figwheel and set your cider cljs-repl to that, and then for each project you can do arbitrary initialization

chadhs12:06:08

@U064J0EFR now I feel less dumb 😀 going to try your user fun idea 💡

👍 1
chadhs20:06:57

@U064J0EFR finally getting back to this. i’m surprised these aren’t more common questions, but maybe most people running CIDER and figwheel just figure this bit out?

chadhs20:06:15

hoping to get something like this to work

;;cljs
  ;; (setq cider-cljs-lein-repl
  ;; 	"(do (require 'figwheel-sidecar.repl-api)
  ;;            (figwheel-sidecar.repl-api/start-figwheel!)
  ;;            (figwheel-sidecar.repl-api/cljs-repl))")
  (setq cider-cljs-lein-repl
        "(user/cider-figwheel)")

bhauman20:06:39

@chadhs yep, that should do it

chadhs20:06:15

and in dev/user.clj

(defn cider-figwheel
  "launch custom figwheel repl setup for cider"
  []
  (do (start-server)
      (fig-start)
      (cljs-repl)))

👍 1
chadhs20:06:25

coolio thnx

chadhs04:06:09

Oh gosh no worries I appreciate the help

chadhs04:06:42

I may test your example first again and then compare to my reframe setup