Fork me on GitHub
Maksim Glebov06:08:02

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 Glebov07:08:49

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)...


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).


@glebovmaksim We had some conversation about load file error indication here:


New old-repl-window-less 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).

Cris B11:08:41

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


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 Glebov12:08:27

I can confirm that it's broken.

Maksim Glebov12:08:03

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


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 Glebov16:08:35

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


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

😆 1

New old-repl-window-less 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)


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


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


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

Cris B09:08:34

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


How to eval the whole file in editor?

Cris B10:08:52

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

metal 1
Cris B10:08:33

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 ( 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?


I've not tried this, but have you read this?


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

Cris B04:08:25

Yep that's the guide I used to set it up. I don't know where cider-nrepl fits in (there's no mention of it in the Calva/REBL guide). I think I'll have to postpone this 'till I've read up on how the parts fit together so I can troubleshoot.

Cris B05:08:46

I got it working by adding cider.nrepl/cider-middleware to the alias. So thanks for the pointer.

👍 1

New old-repl-window-less 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)

calva 2

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


I eval'ed these two lines one after the other


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


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


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


I built again too, but same commit hash




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


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


had to revert back to .115