This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-17
Channels
- # aws (3)
- # beginners (81)
- # boot (155)
- # capetown (2)
- # cider (32)
- # clara (14)
- # cljs-dev (40)
- # cljsrn (12)
- # clojure (158)
- # clojure-austin (5)
- # clojure-korea (6)
- # clojure-poland (1)
- # clojure-russia (63)
- # clojure-spec (45)
- # clojure-uk (75)
- # clojurescript (109)
- # code-reviews (1)
- # core-logic (12)
- # core-matrix (1)
- # cursive (36)
- # datomic (16)
- # defnpodcast (1)
- # devcards (2)
- # editors (3)
- # euroclojure (1)
- # events (3)
- # flambo (1)
- # hoplon (19)
- # javascript (4)
- # jobs (1)
- # lein-figwheel (4)
- # leiningen (1)
- # off-topic (1)
- # om (177)
- # onyx (121)
- # pedestal (14)
- # planck (19)
- # proton (3)
- # re-frame (36)
- # reagent (21)
- # remote-jobs (1)
- # ring (4)
- # ring-swagger (6)
- # spacemacs (1)
- # specter (2)
- # test-check (4)
- # untangled (9)
- # utah-clojurians (1)
- # yada (2)
@jasonjckn I was looking for similar, gave up in the end. It seems the standard approach is to cider-clojurescript-jack-in. If you are trying to run fighweel or something, you can run it from the jacked in repl.
Hi I would like to fix this issue: https://github.com/weavejester/cljfmt/issues/49
Does anyone know if the code that uses the var indentatino metadata is a lib that I could use?
@jasonjckn As far as I can tell that isn’t possible. The way clojure allows you to connect is using an NREPL connection. A clojurescript repl doesn’t provide an NREPL connection. The way cider-clojurescript-jack-in
works is starting a clojure repl with NREPL support and then uses cemerick/piggieback
to turn that clojure repl into a clojurescript repl.
@jasonjckn Take a look at cider-cljs-lein-repl
. It is a var the tells cider what to run when calling cider-clojurescript-jack-in
. I use it from a dir-locals.el file to call (start-figwheel)
which lives in my user
ns. You can sub that out for whatever function lives in the :init-ns
you have in your project.clj
@mahinshaw but how do you get two different REPL buffers?
@mahinshaw i'm aware of figwheel repl-api, but not sure how to take a CLJ repl buffer, and create a CLJS repl buffer, and also have CLJS files evaluate in that repl, and CLJ files evaluate in the other
If you are using figwheel, the repl buffer wont exist until the websocket is connected to your cljs app. This is a figwheel thing
If you are using cider connect, you should just be able to start your figwheel repl and wait for it to connect. once that is done, the cider-repl-type
should output cljs
If you use the afformentioned workflow, cider-clojurescript-jack-in, will create two buffers from one repl instance. A clj one, and a cljs one
When you are in cljs code, cider-switch-to-repl-buffer
will open up the proper repl based on the type
In that case, I don’t know that cider provides you with an easy way to create more than one buffer. I would just connect twice, and in one start a cljs repl
Cider will just prompt you and ask if you want to start a new connection, for which you say yes. There is also a way to name them. I used to use two repls, and then moved to the aformentioned workflow
yah that would work, albeit it wouldn't send cljs code to CLJS repl automatically, etc
i'll try it out, I presumed that it has no logic to detect which one is the CLJS repl buffer
I would connect, and get a cljs repl started, make sure the type is right, and then connect again, and use the second as my clj repl
I use cider-cljs-lein-repl
to start figwheel when i do cider-clojurescript-jack-in
, i end up with two repl buffers...
It will choose correctly which one to send code to, depending on the file extension