Fork me on GitHub
#conjure
<
2022-02-17
>
Hukka07:02:06

If I launch an nrepl in repo folder, and a shadow-cljs nrepl in a subfolder, conjure seems to prefer to autoconnect to the former even when editing files in the subfolder. In practice, if there exists both /.nrepl-port and /ui/.shado-cljs/nrepl.port and I edit /ui/src/somecode.cljs, conjure will connect to /.nrepl-port even though it's further up the directory tree. Is there a way to change this behaviour to prefer the closer nrepl?

Olical09:02:22

The only thing that comes to mind as a quick fix is to change g:conjure#client#clojure#nrepl#connection#port_files from the default [".nrepl-port" ".shadow-cljs/nrepl.port"] to [".shadow-cljs/nrepl.port" ".nrepl-port"]. It's not ideal, but it's a short term fix. I think the ideal is to change the searching code to look for each of these files in priority order at each level of the tree rather than searching for one file then the other.

Hukka11:02:22

Thanks. The workaround sounds like it solves my case completely