Fork me on GitHub
#calva
<
2021-08-27
>
punit-naik05:08:23

Hey People! I had a small question. Right now when I jack-in, calva uses the 0.8.3 version of nrepl. Is there any way I can make it to use a different version?

pez06:08:41

Yes, you can specify the version in settings. See https://calva.io/customizing/#jack-in-dependency-versions May I ask why you need a different version?

punit-naik06:08:16

Awesome! Let me give it a try! Thanks for the quick response as always @U0ETXRFEW!

punit-naik06:08:17

@U0ETXRFEW I had to change nrepl version to 0.7.0 as it wasn't able to find one of the classes in my project. The class was this - com.mchange.v2.c3p0.cfg.C3P0Config. I found a similar issue here https://github.com/nrepl/nrepl/issues/206 and thought of downgrading nrepl to 0.7.0. To my surprise, it worked!

pez06:08:09

Interesting. I hope it keeps working!

👍 9
bortexz08:08:02

Hi! Is there anyway to make calva format the protocol implementations of defrecord with 2 indent? currently moves things to the start of the bindings:

protocols/InvokeOperation
(invoke* [this {:keys [ch op] :as args}]
         (if ...))

bortexz08:08:51

Thanks for the answer, I am trying with this configuration, but doesn’t seem to do the trick

{:indents {defrecord [[:block 2]
                      [:inner 1]]}}
Any tip on the config for this? Or why by default it does this behaviour? is it the default format for protocol impl?

bortexz08:08:56

Looking at the code, the block2 inner1 seems to be the default, so I think it shouldn’t format it below the bindings?

bortexz08:08:29

Interesting, if I put the cursor on the (defrecord , then it formats it correctly. But If I format on the (if) inside the implementation of the protocol, it will move it below the bindings