is there a way to configure calva so that "evaluate top form" automatically evaluates a variable when toplevel form is (def var ..)
?
I'm not sure I understand what you mean. If you evaluate (def var ..)
it will define/intern that var and return the var, like #'namespace/var
. Are you wanting it to return the value of the var?
yeah, i'd like it to return the value
meta: there might be a better workflow, but i have a bunch of (def bla ...)
in a test file as i'm prototyping/testing stuff
so that i can inspect the state of each variable while i make changes
After eval'ing the form, you can place the cursor after the var like (def var| ..)
and run "Eval current form" (ctrl+enter by default) and it will return/show the value.
You could also place the cursor there in the beginning and hit alt+enter to eval top-level, then ctrl+enter to see the value
But eval'ing the top-level form should always return the variable itself. This is the nature of clojure and what people generally expect.
makes sense; i saw in the docs that it treated comment
differently so wondered if I could do the same with def
You may find some use in spy functions
http://clojure.github.io/tools.logging/#clojure.tools.logging/spy
There are other libraries that have this behavior too
It requires changing the code a bit, but it will function the same, plus log the value
brilliant; that solves it and i can keep the same shortcut
There's a new Calva in town: https://github.com/BetterThanTomorrow/calva/releases/tag/v2.0.126
@pez I finished my live share PR today. Iβm hoping for 2.0.127 soon π
Have time to try this out together with me?
Yes sure but not right now Iβm afraid. Maybe tonight? Or else weβll find some time coming days.
I think I can make it later tonight.
Awesome. What time? 20.30? (Youβre also in CET right?)
Yes, CET. I think 20:30 might work.
Ok later is also fine if that works better for you...
I've now tried to get liveshare started in my virtual box, but I won't keep my sanity if I continue.
Having it working now. Windows is driving me crazy. But your changes are compensating. Haha.
Dear Calva-friends. This is the VSIX from @stefan.van.den.oord's PR. It adds LiveShare support to Calva. Apart from the LiveShare stuff it meant that some central code around what is the project root directory needed to be updated. So we want help with testing this out in non-LiveShare use as well. Please install and run with this. https://8257-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.126-pull-805-1049b25c.vsix
Also. If you install that VSIX, you are welcome to join @stefan.van.den.oord and me in about halv an hour when we are going to test using this for a Calva Party. π Zoom link will be posted soon.
I plan to join the party π
By the way, this vsix has the same version number as the latest released version, so I have seen vscode do some strange things with trying to update it. But I think we should be fine for testing.
Yes, let's hope it behaves.
Here's the zoom link: https://us02web.zoom.us/j/3584342566
Starts in 30 mins?
It says that? I'm in the meeting now.
π
Doesn't work?
Lonely part anyway. π
Oh I'll join lol
thought you said an hour from now - 30 mins ago
Half an hour, but I misspelled it. π
@stefan.van.den.oord, are you on your way?
Oh sorry I missed the link, one secβ¦
Now we have a party!
That was fun!
Itβs now building v 127; thanks for the nice chat and weβll be in touch later this week!
Let's post a link to the 127 VSIX when it's built. I can do that.
master
should be updated now, @brandon.ringe. I hope it's correct. π
Build is done. Good night! :sleeping_accommodation:
Dear Calva-friends: Here's a build of @stefan.van.den.oordβs LiveShare enabled Calva with the version bumped so that it won't get reset automatically by VS Code: https://8267-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.127-pull-805-a386a8dd.vsix Please run with it even if you are not using LiveShare, to help find any issues with jack-in and connect that might (unlikely) have entered.