calva

Wednesdays you might find @U0ETXRFEW in the Gather Calva space. Invite is https://gather.town/invite?token=GZqrm7CR and the password is `Be kind`.
Jack Arrington 2020-08-04T03:10:20.082900Z

I believe I toggled them off earlier, but I will give it a try again to make sure

Thingographist 2020-08-04T04:28:41.084100Z

please replace asComment with comment https://github.com/BetterThanTomorrow/calva/blob/3f54f2306455399a6f89be5ea560eabc68e72049/src/evaluate.ts#L86

👍 1
pez 2020-08-04T07:42:45.086200Z

Thanks!

Maksim Glebov 2020-08-04T06:25:02.085200Z

Hi! Just want to give a feedback about new peek-to-result feature. First of all, thanks for putting your effort on this. I see some people likes it, which is great! For me it turned out to be a bit difficult to use: - When evaluating the form with Alt + Enter and having cursor not on a parenthesis, the peek widget displays the current function definition instead of the output result. The result is still accessible, but it takes two extra clicks to reach it. - Closing the peek with Esc does not work if my cursor is inside the code area of the peek (i.e. for scrolling). I think this is a default VSCode behaviour. For now I ended up with just opening the output window with Ctrl + Alt + C O when I want to see full result. It opens in a new editor group and my file is still visible. After some exploration I usually close it again. This workflow is pretty fast (faster than peeking with extra clicks) and can be even faster if I'd be able to close the output window with key shortcut (default VSCode shortcut Ctrl + W is overwritten with Paredit selection in Calva).

Maksim Glebov 2020-08-04T07:00:49.085400Z

For me the only inconvenience of working with closed output window is that I can't see the effect of file loading (`Ctrl + Alt + C Enter`). I was thinking about some kind of label in a status bar showing the current namespace and error status (green/red)...

pez 2020-08-04T07:45:04.086400Z

Thanks. Yes, peek at definition is not really meant for this use, so it comes with some inconveniences. The arrow keys walk and expand the different definition locations, so you don't need to click with the mouse (at least).

bringe 2020-08-04T16:36:23.108600Z

@glebovmaksim We had some conversation about load file error indication here: https://github.com/BetterThanTomorrow/calva/issues/717

pez 2020-08-04T09:36:30.093100Z

New old-repl-window-less vsix https://7173-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.116-711-remove-old-repl-window-5a088397.vsix, it restores evaluate to comment, reported by @elizavetaskull, and also makes the result definition peek be alone when the cursor hasn't moved since the evaluation was run. That means that for a key sequence of alt+enter, alt+f12 , there should only be the results definition there, so no need to navigate. And hover definition on symbols should still be showing what they used to show. Please give it a try, @glebovmaksim and @slack1304 (and everyone, of course).

3
dabrazhe 2020-08-04T09:53:09.094600Z

I am wondering what are the benefits of the output window over the old Repl window? Or is this just for ease of maintenance?

Cris B 2020-08-04T09:56:53.095100Z

There's a detailed report https://clojureverse.org/t/calva-summer-of-bugs-2020/6303

dabrazhe 2020-08-04T09:58:22.095300Z

excellent, a good long read that wont go away, like it does on Slack : )

Cris B 2020-08-04T09:59:34.095500Z

Totally :spock-hand::skin-tone-2:

maxp 2020-08-04T10:37:25.096200Z

How to eval the whole file in editor?

Cris B 2020-08-04T10:47:52.097900Z

@maxp the command is 'calva - load current file & dependencies', bound by default to ctrl-alt-C Enter

🤘 1
Cris B 2020-08-04T10:54:33.103700Z

I'm trying to get Calva working with REBL. I haven't read up yet on how the pieces (nrepl/middleware/editor) fit together so am flying a bit blind. I have a deps.edn alias that starts an nrepl, REBL, and middleware (https://github.com/RickMoynihan/nrebl.middleware) to connect these up. Then I connect to that running nrepl from Calva (I'll leave automating with a Calva connection sequence 'till everything else works). This works partially - I can evaluate forms in Calva, and inspect data in REBL. But Calva's documentation and go to definition commands don't work, so presumably the middleware and/or REBL are getting in the way. Is this to be expected, or should I be able to get both data browsing & Calva's commands all working simultaneously?

Cris B 2020-08-04T11:00:41.103900Z

Pasting seems to be broken for me - the pasted text flashes briefly then disappears.

pez 2020-08-04T11:23:50.106100Z

Generally pasting into an editor? There is a change to the pasting in there, actually. It is a little hard to imagine it having that effect, but somehow it must...

Maksim Glebov 2020-08-04T12:00:27.106300Z

I can confirm that it's broken.

Maksim Glebov 2020-08-04T12:27:03.106700Z

Peeking has become more convenient from a user perspective. Not sure if that little trick with cursor looks good in the code though...

pez 2020-08-04T16:01:53.107100Z

Oh, it fits in there pretty cleanly. We get a position to provide definitions for and just need to check that it's not from where an active results annotation was activated. Like so:

async provideDefinition(document, position: vscode.Position, token) {
    const evalPos = annotations.getEvaluationPosition(position);
    const posIsEvalPos = evalPos && position.isEqual(evalPos);
    if (util.getConnectedState() && !posIsEvalPos) {

Maksim Glebov 2020-08-04T16:33:35.108100Z

Ok, good to know :) Just wondering if we were asking for something that can't be done in a nice way. Thank you!

pez 2020-08-04T16:37:48.109Z

We're just abusing the definition provider a tiny bit more. Haha.

😆 1
bringe 2020-08-04T16:40:57.109200Z

I've not tried this, but have you read this? https://calva.io/rebl/

bringe 2020-08-04T16:41:17.109500Z

Also if goto def is not working, maybe you didn't load cider-nrepl as a dep in your repl

pez 2020-08-04T16:52:07.109800Z

New old-repl-window-less vsix: https://7143-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.116-711-remove-old-repl-window-49cdf856.vsix • Paste now works again • *1. *2, etcetera works as expected in the editors (it never has with Calva, which became exposed with the new output/repl window)

pez 2020-08-04T16:52:33.110Z

Oh, this should have been in the channel....

pez 2020-08-04T16:52:40.110300Z

New old-repl-window-less vsix: https://7143-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.116-711-remove-old-repl-window-49cdf856.vsix • Paste now works again • *1. *2, etcetera works as expected in the editors (it never has with Calva, which became exposed with the new output/repl window)

2
bringe 2020-08-04T17:08:20.110600Z

With this vsix, I'm still getting the #namespace[namespace] result with *1 :thinking_face:

bringe 2020-08-04T17:09:18.110800Z

I eval'ed these two lines one after the other

pez 2020-08-04T17:15:32.112400Z

I might have liked an old vsix. With only the first fix. 😀

pez 2020-08-04T17:16:49.113700Z

I'm afk. But if you trigger a new build, then we should get the *1, etc fix.

bringe 2020-08-04T17:24:12.113900Z

Gotcha!

bringe 2020-08-04T17:32:38.114100Z

Latest build does not seem to be working either. Maybe you need to re-push?

bringe 2020-08-04T17:32:55.114500Z

I built again too, but same commit hash

bringe 2020-08-04T17:32:57.114700Z

¯\(ツ)

pez 2020-08-04T19:32:04.115500Z

I did a force push. Might be what is messing it up.

bringe 2020-08-04T19:41:06.115700Z

Also having a weird issue where the current namespace keeps reverting back to user in the output window

bringe 2020-08-04T19:44:00.115900Z

had to revert back to .115