Fork me on GitHub
#conjure
<
2021-02-17
>
valsen12:02:13

Hi everyone, I just found conjure today and am loving it so far! But I can’t seem to get it connected to my running shadow-cljs nREPL. I’m using vim-jack-in and it’s working flawlessly for my deps.edn projects, but with shadow-cljs I get the following error message in the HUD when running :ConjureShadowSelect app . Any ideas what I might be doing wrong?

valsen13:02:54

I apparently wasn’t connected to the repl, so executing :ConjureConnect <port> first fixed the problem:) Now I’m just trying to figure out how to have both a clojure repl and a shadow-cljs repl running simultaneously and quickly switching between them when switching between clj and cljs files.. Right now I get disconnected from the active one when connecting to the other one

Olical15:02:15

Glad you fixed it! Sorry for not getting back to your question! I tend to check the discord far more than clojurians slack, but that's not a great excuse

Olical15:02:07

Also, that sort of "dual" connection can be solved in a couple of ways. 1) You switch nREPL sessions (see :h conjure-client-clojure-nrepl) when you switch buffers between your CLJS and CLJ sessions. 2) You use the more powerful and general ConjureClientState (see :h conjure) to hop between different Conjure "states" as you swap file extensions. This requires you to set up your own (simple!) autocmds to switch the client state, but it's extremely flexible.

Olical15:02:48

When you set the client state name you basically swap to a new instance of Conjure... its kinda like having browser tabs for Conjure itself? So you can Clojure with one nREPL in one state and CLJS with another nREPL in the other.

Olical15:02:09

It's up to you when you swap states though, and what those states are called, which is where your own autocmds come in.

valsen03:02:29

Wow this is great, thanks so much for the detailed explanation! And I need to fix my notification settings here on Slack, keep missing replies:man-facepalming: