This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (1)
- # babashka (132)
- # beginners (52)
- # calva (46)
- # clj-kondo (8)
- # cljdoc (17)
- # clojure (13)
- # clojure-australia (1)
- # clojure-dev (3)
- # clojure-europe (4)
- # clojurescript (4)
- # cloverage (1)
- # conjure (22)
- # datomic (9)
- # emacs (2)
- # fulcro (16)
- # leiningen (5)
- # malli (26)
- # off-topic (16)
- # pathom (3)
- # portal (5)
- # reagent (10)
- # reitit (5)
- # rewrite-clj (1)
- # ring (1)
- # shadow-cljs (14)
- # spacemacs (6)
- # tools-deps (10)
- # vim (11)
- # vscode (1)
- # xtdb (10)
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?
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
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
It requires changing the code a bit, but it will function the same, plus log the value
There's a new Calva in town: https://github.com/BetterThanTomorrow/calva/releases/tag/v2.0.126
Yes sure but not right now I’m afraid. Maybe tonight? Or else we’ll find some time coming days.
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.
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.
It’s now building v 127; thanks for the nice chat and we’ll be in touch later this week!
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.