This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-12
Channels
- # aleph (3)
- # announcements (7)
- # babashka (22)
- # beginners (44)
- # calva (19)
- # chlorine-clover (1)
- # cider (20)
- # clj-kondo (55)
- # clojure (100)
- # clojure-austin (9)
- # clojure-europe (19)
- # clojure-italy (19)
- # clojure-nl (13)
- # clojure-portugal (2)
- # clojure-uk (7)
- # clojurescript (38)
- # community-development (3)
- # conjure (2)
- # cryogen (57)
- # cursive (6)
- # datalog (3)
- # datomic (24)
- # emacs (17)
- # exercism (8)
- # fulcro (3)
- # holy-lambda (8)
- # jobs (6)
- # jobs-discuss (9)
- # joker (3)
- # lambdaisland (5)
- # leiningen (5)
- # music (9)
- # nextjournal (1)
- # nrepl (2)
- # off-topic (9)
- # other-languages (4)
- # pathom (6)
- # polylith (23)
- # re-frame (5)
- # reagent (5)
- # remote-jobs (1)
- # reveal (1)
- # shadow-cljs (3)
- # tools-build (1)
- # tools-deps (3)
- # xtdb (2)
I saw that cider is not yet very integrated with babashka, did anyone hack something together in the meanwhile?
it would be pretty easy to just at least start the bb --nrepl-server
in a comint process and do a cider connect right?
That works, and is the recommended way in the Cider docs 😉 https://docs.cider.mx/cider/platforms/babashka.html
yes that's what I'm already doing
I'd like to do even less though 😄
but well I can do it myself with a few lines of elisp
Hehe well I think it's just 3 lines and will probably be done in cider anyway
But if it works I'll share it somehow
Super curious how it can be done even quicker than cider connect and then type localhost + port. Related: https://github.com/babashka/babashka/discussions/907
tbh it's just something like
(defun bb-and-connect ()
(interactive)
(make-comint "bb-nrepl" "bb" nil "--nrepl-server")
(sleep-for 2)
(cider-connect '(:host "localhost" :port 1667)))
which kind of works already but of course it's not particularly smart
this fails if you do it twice since it would try to bind the same port again of course, but it's quite easy to improve as well
and yes ideally it should just be part of cider even though the workflow is a bit different, but also something like this is already enough for me
I've done a few changes and pushed to https://github.com/AndreaCrotti/bb-nrepl
with the hook mentioned in https://github.com/AndreaCrotti/bb-nrepl/blob/main/bb-nrepl.el#L36 I just create a new bb file and everything works already, so 0 steps instead of 2 pretty much
there are still a few things to iron out but I guess it's a start