Fork me on GitHub
Nathan K09:08:50

Hi πŸ‘‹ I'm fairly new to clojure. I couldn't find a way to stop a run-away loop before in the calva REPL in vscode. It just kept writing to the output file. Is there a trick to stopping this sort of thing?


Hi @nathan.l.kramer, welcome! You can try the command Calva: Interrupt Running Evaluations. But it depends a bit on how asynch or not the loop runs.

πŸ‘€ 1
Nathan K10:08:38

Thanks @pez πŸ˜„


An update to Calva just released. It adds a peek definition pointer to the evaluated forms, so that even if you are not displaying the output window on the screen while you evaluate code, you can quickly peek into it using VS Code's Peek Definition command. See the docs for a demo:

πŸŽ‰ 3

previously with only the output window, anytime the evaluated output was an error, I was running the fold command to make the output more legible. which worked, but was a bit tedious but the peek definition opens at the top of evaluated output (in most cases at least)*, and in general makes it much more navigable, really great, thanks for all your work!

❀️ 2

It feels a bit bad abusing the peek-definition like this, but, hey, it works! πŸ˜ƒ


I like it, pragmatic πŸ˜€. Could you possibly inspect the length of the result and if it's longer than some limit it automatically shows the peek?


Might be possible. Please add an issue about it.


I think rather than automatically showing peek (since a popover an be intrusive), automatically folding the repl window output would be nice


I don't think that's possible. There's only a way to fold the current editor. As far as I have understood things.


yeah I’ve never worked on a vscode extension, just thought maybe it’d be possible to fold the repl output programmatically, but if that requires focusing in and out of editor windows may be quite tricky to do


The editor object does not expose an API for it. So we would need to execute the fold command, which operates on the active editor.


@pez related: what are your thoughts on this type of workflow: e.g. not interesting enough/great but not easily supported/etc


Unfortunately not possible in vscode yet, but at least it's on the backlog now. See

πŸ‘ 1

That looks super awesome. We can't really create inline result widgets like that yet in vscode, but it would be possible to create something like it using tree views (in the Explorer area).

πŸ‘Œ 1