Fork me on GitHub
#calva
<
2024-01-08
>
Noah Bogart16:01:39

is it possible to run tests from other test frameworks in calva? i am working on a clojure.test alternative for fun, and would like to be able to run test functions (named, not anonymous like midje) the same way as "Run Current Test" etc

seancorfield17:01:14

I use custom REPL snippets for this (I run clojure.test directly, rather than via Calva/CIDER testing infrastructure).

👍 1
Noah Bogart17:01:32

oh clever, that makes sense

pez16:01:50

Dear Calva-friends, a new release of Calva https://github.com/BetterThanTomorrow/calva/releases/tag/v2.0.406 • Calva development: Fix: https://github.com/BetterThanTomorrow/calva/issues/2378 • Calva development: Fix: https://github.com/BetterThanTomorrow/calva/issues/2376 There are no changes to how Calva behaves in this version. It’s @dzedasp who has improved the Calva extension development workflow for windows users. Thanks Dzedas! 🙏 ❤️

🎉 4
calva 4
orestis11:01:05

Not sure if it's the cause, but I just updated to this and clojure-lsp doesn't start any more - even when manually clicking "Start" via the menu.

orestis11:01:31

Hm, I just needed to be patient; it kicked in after a minute or so, not sure why so slow.

pez12:01:16

I had a situation yesterday where I think Calva had borked the clojure-lsp download and I had to manually find Calva’s extension folder and remove it. Not the same as you had there, @U7PBP4UVA, but similar symptoms (just that it never stopped spinning). I’m figuring what to do about it, because I don’t know how to reproduce…

orestis12:01:57

It might be a case of slow internet - my experience was that the icon never started spinning when I clicked "Start". I moved my attention elsewhere and when I came back to VSCode, everything was back to normal.

David Yang17:01:42

hey - curious if there’s a way with Joyride/Calva to show the expected arguments for the currently highlighted function in the status bar. right now I turn off hovers and use command-K command-I to show it, but would be nice to always get the args there.

pez17:01:40

That’s a really good question! I think it should work with using the Calva REPL API from #Joyride and call the doc macro. It produces a pretty predictable output that you can parse and display the signature in a statusbar item.

(with-out-str (clojure.repl/doc +)) => "-------------------------\nclojure.core/+\n([] [x] [x y] [x y & more])\n  Returns the sum of nums. (+) returns 0. Does not auto-promote\n  longs, will throw on overflow. See also: +'\n"

pez17:01:50

There’s also the command Trigger Parameter hints that shows the signature as a tiny hover and highlights the current parameter. Default binding is shift+cmd+space on mac. Could be shift+ctrl+space on windows/linux.

pez17:01:03

We could add Calva API for extracting the signature info for a symbol too, without too much effort. Let me know if you want to do it. 😃

David Yang17:01:27

Thanks for the Trigger Parameter hint! I never found that because 1Password had overwritten that keyboard shortcut but getting rid of that for this!

🙏 1