Fork me on GitHub

Is there a default shortcut for running -main, like there is for load/eval the file? What I’m trying to do, generally, is make it easier to make a code change, then quickly run a specific function to see the effects. How do folks typically handle this workflow with Calva?


A custom repl command snippet should work for this.


Cool, thanks. Looking into that now.


That was pretty straightforward!

"calva.customREPLCommandSnippets": [
        "name": "Run -main",
        "key": "m",
        "snippet": "(-main)"
Thanks, @U0ETXRFEW!


You are welcome. Maybe you should include a namespace in case you are working in some other file.


I can see how that would be useful, but I imagine I’ll want the same feature for running -main in every project I work on. So wouldn’t I end up needing to modify the shortcut each time I switch projects?


You can define the shortcut in workspace settings.


In improving my workflow, I am thinking about ditching the interactive repl pane and use it only when very necessary. However, one thing annoying when hidding the repl is that, say if I do a calva evaulate current file and if something bad happens, e.g., thrown exception, I can only go to the repl to see what’s going on. I think if it would be better to also show the output somewhere inside the bottom part of vscode (see figure). Possible? Or any better approach?


Issue welcome. Let’s discuss it there. I think this sounds important to solve. Maybe this is a reason I keep that pane open so much.


This is one of the behaviors of cider that I like too


Yeah, the only reason I keep the Calva output window open at all -- resized to just a few lines on the right hand side below my Portal window -- is to see if I get errors running tests or loading an entire file. Everything else I can see inline or in Portal.


I've toyed with the idea of a Joyride script to show and then hide the Calva output window on a hot key but even that feels kludgy.


@UGC0NEP4Y Not everyone has that window open either (the output/terminal stuff).


Yup. But somehow there shall be some room for the output. Could be inline or somewhere (tbd?).


What cider does is: it shows the cider-report window when a exception happens, it's a quick emacs window where you can see something and quickly dismiss with ESC or q or use other keybindings to see more details about that report, I personally like a lot


Something like that would be nice -- only for certain commands (eval whole file -- load-file) and only for errors. But the ability to trigger it via the API would also be very valuable to Joyride users, so that I could run tests the way I like (where I tap> the summary of the test results) but also pop open the output window to see the output from the tests 🙂


seeing some inconsistent/unintuitive behavior with the new backspace in symbols/keywords. I first noticed it when trying to correct a typo in a dependency name and backspacing in the middle of the symbol name was just inserting/removing spaces; other positions in the map don't all behave the same way.


I can reproduce it like this: (here I'm pressing backspace, but a space is inserted)


I think I see the problem: this function is wrong, because it doesn't check if you have are beyond the start of a current, non-whitespace token: I can submit a fix when I get home


thanks, just tried the vsix from that PR and it does the expected backspace-y things now


awesome, thanks for trying it


Thanks for attending to this, @isak ! I’m at #clojured and have low bandwidth today, but will try to find some time to assist with publishing the fix.


Your fix is on it's way out now, @isak

😅 1

Nice, thanks!


I saw your comment - I'll will create a new issue next time.

🙏 1