This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (14)
- # bangalore-clj (1)
- # beginners (89)
- # calva (166)
- # cider (33)
- # clara (12)
- # clj-kondo (1)
- # cljdoc (8)
- # clojure (101)
- # clojure-austin (1)
- # clojure-colombia (7)
- # clojure-dev (14)
- # clojure-europe (5)
- # clojure-hamburg (10)
- # clojure-italy (9)
- # clojure-nl (31)
- # clojure-spec (4)
- # clojure-uk (39)
- # clojurescript (17)
- # clojutre (3)
- # code-reviews (16)
- # cursive (72)
- # data-science (1)
- # datomic (81)
- # duct (8)
- # emacs (4)
- # figwheel-main (1)
- # graalvm (2)
- # jobs (9)
- # kaocha (21)
- # lambdaisland (2)
- # luminus (4)
- # off-topic (35)
- # re-frame (1)
- # reagent (101)
- # reitit (4)
- # ring-swagger (5)
- # shadow-cljs (17)
- # sql (40)
- # tools-deps (4)
- # vim (28)
I haven't worked calva for awhile. assume we are talking clojure (and not script) here?
I'm a little rusty, but it doesn't look (with current versions) to be doing what I expect either
yes. prior to shadow, things where quite the mess. My stuff came before all of that was really online, so it was ugly.
yeah, I loaded my clj/cljs/cljc "full stack" thingmo, and I'm having the same thing you are talking about. Something changed, that used to work
kk, I'll go back and sit in the emacs soup. I'm so ancient I'm able to deal with it.
I want to see vscode/calva succeede. It isn't quite there yet, but it has good people behind it. In a couple of years, that will be the one true way IMHO.
yeah at the moment both autocomplete and definitions aren't working in shadow-cljs for me
emacs is pretty byzantine, but a lot of what calva suffers is because of VS-code design choices. For example, ^X52 is something I do all day in emacs, and VScode doesn't have a comparable story
So, I can jump to definitions in my shadow project (which is Calva). Let me try with a browser project...
Hey, I'm trying to switch from Cursive to Calva. Previously I would start a
lein repl and do a remote connection to it from Cursive. For CLJS I'd use
yarn shadow-cljs watch app. When I "jacked-in" Calva, I chose shadow-cljs, and for the cljs build, I chose app again. The CLJ repl seems to work, but the CLJS repl says that no application is connected to the REPL server. I think this is more related to shadow-cljs, but can anyone point me in the right direction?
So, just checking, after you have evaluated a cljs file, can you jump to definitions and see docs on hover?
I've used leiningen+figwheel previously. I feel like we just replaced figwheel with shadow, so we're probably not using shadow to its full potential
(It doesn’t work for some people, it has just been reported, and when I try with a browser project, it doesn’t work either. Unless I run the dev version of Calva, which doesn’t seem to have the problem… But neither are you…
Stick to that a while, then is my advice. 😃 Until we have figured out if it is latest version of shadow that throws things off.
So, it wouldn’t work with navigating to definitions for me either, using a browser target, @gerred, @hoppy, @iha2. It looks like something has moved in shadow-cljs actually. Because if I use this prerelease version it works: https://github.com/BetterThanTomorrow/calva/releases/tag/v2.0.35-wip-custom-repl-connect-sequence (the reason that would work might be that the prerelease specifies the piggieback version it uses, and maybe latest shadow is using something there that Calva doesn’t like…) Please try with that prerelease VSIX and let me know if it works. If so, I’ll cut a release (though I had planned on testing this a bit more before releasing, but there is little point with that if it is better than the currently released one)..
Cool. I've published a new version on the Marketplace, which is almost the same (+ a bug fix) as the prerelease. So you can upgrade from there now. So happy I had a solution in the stove. I do wonder what changed in shadow...
One thing about shadow jack-in. It is a bit different from Figwheel in that it doesn't give me any obvious hooks to follow the process. So with Figwheel the connection sequence is much more ... hmm what's the word ... well, held together. The most visible difference with shadow Calva indicates it is connected even before the cljs app is started. Anyway, in the Terminal jack-in pane, you'll find the link to the webapp. Saves you typing. 😃
Hi! Recently I started using Calva, and I’m happy with that. However, in our project we use 2-space indentation for function (macro) arguments while Calva follows the community Clojure Style Guide, so it uses 1-space indentation for the same case. I wonder is there some way to customize that? The doc says “[Calva gives] you some options to tweak this style”, but I didn’t find them except calva.fmt.* ones, and those didn’t help. Maybe I did it wrong. Can someone help me?
calva.fmt.* once are the only tweaks Calva offers atm. There was a thread about this yesterday, I’ll tag you in there, @zelark.
Wouldn’t it be cool, if there was a shortcut directly in Calva, which
calls a form, that is, it wraps a from in () and evaluates the whole thing. I think there could be a separate shortcut for this, so that after we define a function, we can directly call it. Here’s an example:
If we place the cursor right after the end of the form and press the shortcut for evaluation, we’d get something like:
(defn hello  "hello")
#'some-namespace.core/hello. However, if we press the shortcut for
calling the form, we’d get
"hello". That would save writing on a newline
(hello)and evaluating it.
(Though, it would probably rather be *Call Current Top-level form*, since you probably have the cursor inside the form, and even if you have it right after, it would still do the right thing.
Yeah, to be honest, the main use-case for me would be evaluating tests, defined with
deftest without needing to write tne name of the test on a new line and evaluating it:
(deftest foo ...) (foo)
Yeah, I think it’ll take some analysis of the form. I also think nREPL can help with that.
v2.0.35 is out. Adds stuff mentioned here: https://clojureverse.org/t/please-help-test-does-your-project-work-with-calva-if-not-why-not/4808
And since it also fixes a problem with jacking in to latest shadow-cljs, we decided to release it. We are still very keen on feedback, of course.
a quick re-jack-in so I can restart a process without having to kill the task, etc., if I'm bringing in a new dependency
Out of curiosity has anyone created a shareable key-mapping that mimics emacs key bindings for CIDER ?
@gerred: That sounds pretty cool. I don’t know how to do it, actually, but sure it should be possible.
@camechis: Not sure how far these take you, but it is a start? https://github.com/BetterThanTomorrow/calva/wiki/Keybindings-for-Emacs-users
this is interesting and might be really nice too: https://github.com/rksm/clj-suitable
I ran shadow-cljs manually with the newer dep but no dice inside of calva, so I imagine there's more to it than just updating the dep 😉
npx shadow-cljs -d cider/piggieback:0.4.1 -d cider/cider-nrepl:0.21.1 watch :app it works, when I change that cider-nrepl version it does not.
can you test it with this? https://github.com/BetterThanTomorrow/calva/releases/tag/v2.0.36-nrepl-upgrade
calva's reporting 0 tests when trying to run both individual and all tests (though it's 1 test) for shadow-cljs connected to a profile
mhm iam not sure how testing works so i cant even guess where the problem is could you post an issue with this
oddly, I managed to do some combination of things that got it to actually report to the output and make calva happy....and then never managed to do it again 😅
Thanks! I haven’t tried the test runner with shadow-cljs even. I wrote the test runner parts early on, before I realized there were cljs tests. With shadow I just have
yeah I think making a test build of course works, because it's generating out a js file.
About suitable. Yes it is sweet. The reason we have not updated is that we had this big jack-in thing cooking, and suitable is a bit unstable. So to not introduce two sources of error at once…
I think it could be a Good First Issue:tm: , @gerred, to add an opt out for new cider-nrepl versions. Just sayn’
ah ha. I'm doing this with my
:app build and evaluating/running individual tests as I go.
Haha, yeah, why would you opt out? 😃 I think that with cider-nrepl it is pretty safe to follow the latest version. But sometimes… haha. Anyway. I’d like for Calva to follow the latest, and make it easy for the user to notch it back a step. Or something. We should probably discuss it some.
i would follow as closely as possible to cider-nrepl version as possible otherwise it could be harder to migrate from older versions
Yes, more like that. Maybe a very nice opt-in. “There is a new cider-nrepl, which adds X, Y and Z. Want to use that instead of old boring current version?”
@slack1038, yeah, it makes sense to follow the tip. It is just that in this case I happen to know there are issues. Then what makes sense changes, I’d say. 😃