Fork me on GitHub

This was probably asked before, but I can no longer find it ... how do you prevent cider from stealing focus from the repl when an exception occurs?


now when I make a mistake (which I sometimes do :p) my whole window layout changes and the focus is on the stack trace buffer, which kinda breaks the flow of things


Are you aware that pressing q closes the stack trace buffer and restores your window layout (I dont know how to prevent the stack trace popup. I like to know when there are errors :))


I don't mind the popup, it's just the focus stealing that I'd like to prevent. But yeah q works, or wind-move back 🙂


I'll take a look at the docs! thanks


(setq cider-auto-select-error-buffer nil)
seems promising

👏 4

yep that did the trick, cool. Much better!


I'm still struggling with getting a CLJS repl going in cider with leiningen, unfortunately. I've removed everything in my .dir-locals and commented out all dependencies relating to cider (piggieback, figwheel-main, etc.) in my .lein/profiles.clj to try to get my setup up as "vanilla" as possible to match the docs. I can confirm that dependencies are getting injected per cider-inject-dependencies-at-jack-in. What I'm seeing is trying to load Clojure dependencies when I run cider-jack-in-cljs in my `*Messages*` nrepl log in emacs:

#error {
 :cause Could not locate myapp/core__init.class or myapp/core.clj on classpath.
 [{:type .FileNotFoundException
   :message Could not locate myapp/core__init.class or myapp/core.clj on classpath.
   :at [clojure.lang.RT load 463]}]
 [[clojure.lang.RT load 463]
...and then I see (in *Messages*)
error in process filter: user-error: No figwheel-main build files (<build-id>.cljs.edn) were found
error in process filter: No figwheel-main build files (<build-id>.cljs.edn) were found
I get a Clojure repl started up for some reason but no CLJS repl. I'm really confused as to what I'm doing wrong at this point. If anyone has any suggestions I'd appreciate it.


oh versions are: cider-20200101.839, nrepl 0.6.0 (via injection), piggieback 0.4.2 (injected), cider-nrepl 0.23.0-SNAPSHOT (injected)


I'm guessing at this point that there's something in this old, crufty project.clj that's interfering with cider's repl startup somehow, I'm just not sure where to start to figure out what that may be


@ddellacosta Could it be that you’re starting the right profile and that’s why some things are missing for you?


Also - what’s your version of figwheel-main?


@bozhidar It may be that I haven't configured figwheel-main correctly--I assumed also that it would get loaded in by default. Do I need to set that up explicitly? Does the version of figwheel set up in my project.clj for unrelated dev purposes determine that, or am I offbase? Apologies for what may be stupid questions


I've just added [com.bhauman/figwheel-main "0.2.3"] to my :dependencies in the user profile in ~/.lein/profiles.clj and nothing changed, fwiw


@ddellacosta Well, if it’s on your classpath after cider-jack-in then it should work. I’m assuming that you’ve also added figwheel-sidecar or whatever the nREPL integration package was named.


let me confirm


added [figwheel-sidecar "0.5.18"] to my user profile, trying again now


Or perhaps this was needed only with the old figwheel. I haven’t tried it in a while and I don’t remember the details. @manuel wrote this article with some info a while ago


okay, will check it out


yeah that doesn't help. Anyways maybe that article has the secret sauce


As for those build files - I assume you have to have them. That error is coming from a check in CIDER.


I’m not sure if they are mandatory or not, but it seems we’ve made them required in CIDER. I’m not very familiar with figwheel, I just accepted a PR implementing parsing the build files to provide the users with a list of target builds.


Okay. Yeah I think the CLJS documentation may not be clear enough for how to get this going--reading it it sounds like cider will do most of the work for you if you simply run cider-jack-in-cljs, but it seems like that's not the case. Hopefully I get this working and I can suggest some doc changes, assuming I determine I'm not just doing something stupid


Sorry about the confusion. I’ll try to clarify the documentation on subject.


Thanks, I appreciate it! Will update if/when I figure anything out on my end


can i suggest again that you get this running completely independently of CIDER and only then attempt with CIDER?


I think he’s running in the problem we’ve discussed a while ago that it was a bad idea to make the existence of figwheel build files mandatory. Guess there should be some fallback in case there are no of those.


I'm not sure what you're suggesting. I can get a figwheel repl running with this project just fine. Is there something else I'm missing here?