Fork me on GitHub
#cursive
<
2021-12-29
>
ikitommi15:12:46

would it be possible to handle the Plumatic Schema type hints with different color, e.g. greyed out? testing how that would work with malli, something like this:

ikitommi15:12:14

or similar to java/kotlin, showing/hiding the argument names/types when not needed.

cfleming04:12:55

It would require some work, but it could be done, yes. But it would only work when the schema is in a known location relative to a macro form like your defn examples. I think in Malli the types are often in arbitrary datastructures, right?

ikitommi07:12:41

95% of the time, those hints would be in same place as with schema, just different defn and fn macros.

ikitommi08:12:53

actually, I think it's more 98%. Currently setting the (experimental) malli (plumatic-style) defn munually as resolve as schema.core/defn, but once it gets released, could the mappings be shipped with Cursive itself?

cfleming09:12:58

Yes, for sure. Let me know when they’re nailed down, and if there are any differences from Schema (or any differences you’d like to introduce)

👍 1
ikitommi16:01:21

It’s malli.experimental/defn and works identically to schema.core/defn. Might move to another ns when 1.0.0 ships, but not likely to happen any time soon.

greg18:12:17

I noticed in the Cognitect Datomic docs a pretty nice trick with dereferencing defs: when you use @(def ) (instead of just (def ...)) , and you evaluate it, it not only creates a var but also evaluates it, showing the value of the var in the repl. The thing is the Cursive complains about it and it doesn't look good. Is there a way to get away of this warning?

cfleming04:12:34

I don’t think there is, no - if you could file an issue I’ll see if I can fix that.

👍 1
greg15:01:43

works really nice! thanks @U04V15CAJ @UQTHDKJ8J

zxspectrr19:01:09

yep works great, ty ty

Aurélien Bottazini14:01:07

awesome. I added a review 😉

thanks2 1
J22:01:01

Hi guys! Is there an extra config to enable clj-kondo inspection because not work for me (only evalution form)

borkdude22:01:01

@UHZPYLPU1 if you go to "tools" then you will find "clojure-extras" and there is a checkbox

J22:01:41

Here the config on my editor

borkdude22:01:45

Should be good then. I hope @UQTHDKJ8J can help you with the issue.

🙏 1
J21:01:36

For you record, if I use clj-kondo executable path, it works.

borkdude21:01:51

I see. And if you leave it empty it doesn't?

J21:01:50

Exactly

borkdude21:01:12

Then it's great that we have this binary option available :)

👍 1
borkdude21:01:22

Not sure what's going on though. Perhaps @UQTHDKJ8J will help soon

brcosta21:01:10

Hi guys, sorry to hear that, i'll improve the error messages/logging to make it easier to understand what is going on in this case

J21:01:16

No worries @UQTHDKJ8J ! Thanks for this very cool plugin and thanks @U04V15CAJ for clj-kondo!

👍 1
❤️ 1
borkdude15:01:21
replied to a thread:

This plugin has now been released to the marketplace: https://plugins.jetbrains.com/plugin/18108-clojure-extras/

❤️ 7