@chadhs you start this from Cider by doing cider-jack-in-clojurescript
Everything fires up except the ring server; must be missing something small
if you have a cider connection then you have a ring server right?
oh RING server
sorry
been travelling all day
OK you are using the separate server setup
@chadhs this is the important line https://github.com/bhauman/lein-figwheel/blob/master/examples/separate-server/project.clj#L59
@bhauman 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
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
it does work with lein figwheel
@chadhs yep as you discovered this only works from lein ๐
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
but now with the way that CIDER works with clojurescript it would be a good thing to support this from figwheel/start as well
I would suggest form now just starting your server from the script that launches your figwheel
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
@bhauman now I feel less dumb ๐ going to try your user fun idea ๐ก
@bhauman 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?
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)")
@chadhs yep, that should do it
and in dev/user.clj
(defn cider-figwheel
"launch custom figwheel repl setup for cider"
[]
(do (start-server)
(fig-start)
(cljs-repl)))
coolio thnx
Oh gosh no worries I appreciate the help
I may test your example first again and then compare to my reframe setup
If curious Iโm tinkering here https://github.com/chadhs/ccclock/pull/13/files