Anyone knows if there's a way to start a CLJS repl?
I work on a cljs project, and I have a shortcut to get a CLJS repl (from shadow-cljs), but I can't execute the shortcut unless I focus a .clj file or switch from clj->cljs in the window before.
It'd be great to start a REPL with this setting starting in cljs instead of cljs
I always start as clj and switch to cljs via (shadow/repl :app) (or whatever your build id would be). Cursive automatically detects this switching to CLJS, so touching the select is not necessary. you could bind this to a key via the custom REPL commands. :cljs/quit switches you back to CLJ mode as well, so generally the select box doesn't need to be used at all.
as for actually automatically switching I do not know since nrepl kinda doesn't work that way
you could do it via a clojure.main REPL, but that loses some cursive features in the process
Oh yes, that's the way I always do it, through shadow/nrepl :app but, have you tried storing this as a REPL command and assign a shortcut to it? If your cursor is in a .cljs file, then you start a REPL and execute the shortcut, it won't execute the command. Unless you manually 1. Write the command, or 2. Switch from clj to cljs in the window, or 3. Put your cursor in a .clj file