This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-10
Channels
- # announcements (2)
- # aws (11)
- # babashka (11)
- # beginners (22)
- # calva (28)
- # cider (1)
- # clj-kondo (3)
- # clojars (14)
- # clojure (41)
- # clojure-europe (45)
- # clojure-norway (1)
- # clojure-uk (2)
- # clojured (31)
- # clojureindia (4)
- # cursive (5)
- # datahike (15)
- # datomic (11)
- # deps-new (11)
- # events (1)
- # holy-lambda (19)
- # introduce-yourself (1)
- # minecraft (17)
- # music (1)
- # nbb (3)
- # off-topic (37)
- # reagent (6)
- # reveal (3)
- # shadow-cljs (46)
- # tools-deps (8)
- # xtdb (22)
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?
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?
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.
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 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: https://github.com/BetterThanTomorrow/calva/blob/published/src/cursor-doc/paredit.ts#L796-L804 I can submit a fix when I get home
Here is the fix: https://github.com/BetterThanTomorrow/calva/pull/1768
thanks, just tried the vsix from that PR and it does the expected backspace-y things now
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.
Soon at a Marketplace near you https://github.com/BetterThanTomorrow/calva/releases/tag/v2.0.285