Fork me on GitHub

I got recur working with eldoc correctly ūüôā Here's the code if anyone wants to try it out: I'll use it for a while before making a PR, there's a couple of while loops in there that I'm not entirely certain won't lock up in an infinite loop

ūüĎć 2

hey folks¬†ūüĎč I'm having issues with¬†cider-connect-cljs¬†on a¬†shadow-cljs¬†project. I'm not sure this is the right channel to post my question, but I'm in the hope that someone else here would have faced the same issue before and will point me in the right direction or just say the right channel :) I noticed that when I connect Emacs to a running nrepl using¬†cider-connect-cljs, my REPL doesn't work the same way as it does when I use¬†cider-jack-in-cljs¬†for instance. To be honest, I don't know if¬†cider-connect-cljs¬†and¬†cider-jack-in-cljs¬†have different user experiences but I assume they don't. I have recorded a video to try to explain the problem a bit better. What you can see is: - Run¬†shadow-cljs¬†watch to have the app and a REPL running - Use¬†cider-connect-cljs¬†to connect Emacs on the running REPL - Try to execute some fn like cider-repl-set-ns, cider-eval-last-sexp, and cider-load-file but none seem to have any effect - Use in-ns to check if the REPL is connected to the right project and working The project you see on the video is here¬†¬†(there's nothing special). Versions: macOS Big Sur 11.2.2 Emacs 27.1 Cider latest commit on master (I'm using¬†straight.el)


so there seems to be an issue going on:


CIDER thinks that it is not connected. note the "pending-cljs". As far as CIDER is concerned, there is a clj repl that is in the process of becoming a cljs repl


(do (require '[shadow.cljs.devtools.api :as shadow])
    (shadow/nrepl-select :hexagonal))


this is what CIDER runs when you connect. it require shadow's stuff and then nrepl-select's the build


and it seems that you need CIDER's middleware present for CIDER to be aware that the cljs repl is ready


if you add it to the startup command shadow-cljs -d cider/cider-nrepl:0.25.9 watch hexagonal or just cider-jack-in-cljs it will work


when diagnosing this stuff i always try to do it by letting CIDER jack in, seeing what commands and dependencies it puts in place and then ensuring that the manually set way does the same

ūüĎć 1

hey @U11BV7MTK the -d cider/cider-nrep:0.25.9 worked like a charm. thanks so much for sharing the solution and the rationale behind it!

cider 1

I wonder if I can do that without the --dependency option :thinking_face:


(and outside the dependencies of the project, since not everybody uses Emacs)


i don't know of any way to dependently put it in there besides the command line


i think it would be fine to put it in there and the people who don't use cider wouldn't even notice it


agree ūüôā


thanks again


cider + shadow-cljs REPL does not highlight core functions... (Functions defined in current namespace are highlighted properly) Is that current behavior or I configured something wrongly?


Are the core functions highlighted correctly when using Clojure instead of ClojureScript? I want to narrow this down to configuration vs track-state.


Yes, when using Clojure everything is highlighted correctly.