Fork me on GitHub
#calva
<
2019-04-23
>
jehrhardt05:04:56

Hi, I tried Calva for the first time to work on a figwheel-main project. I followed the getting started guide and everything worked. When I wanted to run the Evaluate current form command, it did not connect, because I do not use Leiningen. I changed the command to:

clj - Sdeps '…' -m nrepl.cmdline --connect
But this does not work, since Calva appends host:port instead of --host host --port port. It would be great, if we could add host and port as variables instead.

pez06:04:55

Thanks for the feedback, @jehrhardt . The dependency on leiningen will be dropped with the next major release of Calva. It would be great to know how the dev build of Calva 2 handles your Figwheel main project. (I'm guessing not good, as the jack-in for clj deps is somewhat in flux right now, but Id be happy to get help with testing of that as we fix it.)

pez06:04:03

(You'll find the latest dev build a few posts up. A new, stabler, one will be posted today or tomorrow.)

jehrhardt07:04:05

I am happy to help you with the testing. I'll wait for the stabler one and will give it a try.

pez07:04:32

I appreciate the help! Stabler might be the wrong word. The difference will be that it shouldn't leave the jacked-in repl running when you close the project in VS Code. The current one fails in cleaning that up when it exits.

pez06:04:25

Looks nice, @yogthos. Yes, we should do it like that. Please file it as an issue (even if I think I'll manage to remember this anwyay.)

yogthos12:04:14

sounds good, I'll add an issue 🙂

pez07:04:07

@yogthos, for now, what I would do is to use the Paredit: Up sexp command, ctrl+up, then Wrap (). That way you will have the cursor at the right place. What does Cursive do when you wrap with no selection and have a sexp adjacent to the right of the cursor?

pez10:04:09

OMG, that was a crappy gif. Here's a slightly better one. 😃

😂 1
yogthos12:04:28

with cursive I tend to select first, and then hit the ( character to wrap, but using wrap cursive will wrap the next form on the right regardless of selection

yogthos12:04:04

it basically scans until it sees the first opening paren, and wraps that s-exp

pez12:04:31

Thanks. It's food for thought. In Calva the Wrap () commands do a similar thing. ( is handled by VSCode today. So if you have a selection and press ( what happens depends on if you have told VSCode to wrap parens or not (Calva also sets this to default to wrap in Clojure files). But we could consider adding our own behaviour for when ( and friends are pressed.

pez12:04:40

And Calva's Wrap commands seem borked for when there is a selection, btw. I have filed an issue about that a moment ago.