Fork me on GitHub
#calva
<
2020-10-11
>
ikrimael00:10:44

is there a way to configure calva so that "evaluate top form" automatically evaluates a variable when toplevel form is (def var ..)?

bringe00:10:08

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?

ikrimael00:10:52

yeah, i'd like it to return the value

ikrimael00:10:59

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

ikrimael00:10:35

so that i can inspect the state of each variable while i make changes

bringe00:10:18

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

👍 3
bringe00:10:47

But eval'ing the top-level form should always return the variable itself. This is the nature of clojure and what people generally expect.

ikrimael00:10:46

makes sense; i saw in the docs that it treated comment differently so wondered if I could do the same with def

bringe00:10:54

You may find some use in spy functions

👍 3
bringe00:10:11

There are other libraries that have this behavior too

bringe00:10:37

It requires changing the code a bit, but it will function the same, plus log the value

ikrimael00:10:43

brilliant; that solves it and i can keep the same shortcut

🎉 3
Stefan15:10:37

@pez I finished my live share PR today. I’m hoping for 2.0.127 soon 😉

🎉 6
pez15:10:10

Have time to try this out together with me?

Stefan15:10:39

Yes sure but not right now I’m afraid. Maybe tonight? Or else we’ll find some time coming days.

pez15:10:02

I think I can make it later tonight.

Stefan15:10:55

Awesome. What time? 20.30? (You’re also in CET right?)

pez15:10:17

Yes, CET. I think 20:30 might work.

Stefan15:10:02

Ok later is also fine if that works better for you...

pez16:10:37

I've now tried to get liveshare started in my virtual box, but I won't keep my sanity if I continue.

pez16:10:29

Having it working now. Windows is driving me crazy. But your changes are compensating. Haha.

pez18:10:41

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

calva 3
💯 3
pez18:10:31

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.

🎊 3
bringe18:10:33

I plan to join the party 😃

🆒 6
Stefan18:10:46

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.

👍 3
pez18:10:12

Yes, let's hope it behaves.

bringe18:10:40

Starts in 30 mins?

pez18:10:14

It says that? I'm in the meeting now.

pez19:10:11

Doesn't work?

pez19:10:49

Lonely part anyway. 😃

bringe19:10:49

Oh I'll join lol

bringe19:10:55

thought you said an hour from now - 30 mins ago

pez19:10:27

Half an hour, but I misspelled it. 😃

pez19:10:38

@stefan.van.den.oord, are you on your way?

Stefan19:10:00

Oh sorry I missed the link, one sec…

pez19:10:06

Now we have a party!

pez20:10:58

That was fun!

Stefan20:10:03

It’s now building v 127; thanks for the nice chat and we’ll be in touch later this week!

pez20:10:03

Let's post a link to the 127 VSIX when it's built. I can do that.

👍 3
pez20:10:48

master should be updated now, @U9A1RLFNV. I hope it's correct. 😃

aw_yeah 3
Stefan20:10:32

Build is done. Good night! :sleeping_accommodation:

👋 3
pez20:10:55

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.

✔️ 3