Hi,
This is basically a plea for a feature discussed previously, to be able to disable automatic saves when running a REPL command (and any other such triggers - I think sometimes just focussing the REPL causes a save? might be wrong about that).
It just seems like it would be a very easy change to implement, and the impact on CLJS development would be enormous.
I do more CLJ development now and it’s been amazing to finally discover what the whole “interactive development” style of clojure programming is supposed to be like. It could be that I’m doing something very wrong but for me the whole experience is completely broken in CLJS due to this one issue.
Recompiling a single function with cmd+enter takes a few milliseconds. Reagent can refresh the UI in the browser in a few milliseconds. I could make an edit, press a single key-combo, and see the change instantaneously in the browser. Instead I have to wait several seconds because a full recompile+reload is triggered.
This is really the difference between “this is how clojure programming is supposed to feel”, and not.
That’s how I get to “am I doing this wrong?”. The idea that such a massive improvement is so close at hand but doesn’t work because of something silly like an autosave that can’t be switched off just seems bizarre. Surely I am missing something? Maybe there’s just not a lot of CLJS devs using Cursive?
Thomas Heller posted what is very nearly a great solution, to turn off autobuild in shadow-cljs, but it has a problem in that it requires jumping between CLJ and CLJS REPLS, which is also a pain in Cursive. Actually now that I’m posting this, I’m thinking that pain might be less bad than the current pain. I haven’t given it a try yet so I should do that.
Sorry if this was a bit of a rant. Cursive is by far my favourite code editor I’ve ever used, and I appreciate it’s a one man effort. I guess I’m just posting in case it’s not clear how much impact this seemingly small change would have.
Having Cursive be able to correctly send commands to either a CLJ or CLJS REPL (e.g. it could be a setting per REPL command), would also solve the problem, and would be super useful for all sorts of other things, but that seems like more of a lift.