Fork me on GitHub
Matthew Davidson (kingmob)12:04:01

Is there a way to trigger attempts to add to the requires/imports based on the namespace alias and var under the cursor? Like, if I copy a fn to a new namespace, it would be nice to get a context action to say "the cursor's on top of d/deferred, if you can determine this is from manifold.deferred, please add that to the :require". I swear I used to be able to do it via Option+Return, but at some point that broke, despite me having the muscle memory it worked. There is context completion, but that requires deleting the last character and triggering, which is slower.


That should work, check under Settings | Editor | Inspections and make sure that all the Clojure ones are selected.

Matthew Davidson (kingmob)08:04:02

Ahh, there it is! "Unresolved Symbol" was turned off. Thanks! This is slowly starting to ring some bells...I think I turned it off because Cursive didn't understand many of the macros used in Manifold and Potemkin, whereas kondo did, so it reported a ton of false positives. I took another look...if I downgrade the Severity and the Highlighting, it seems I can keep the context action but let kondo report the real errors.


You can also use resolve: none for those macros as described here: It’s a much smaller hammer.

Matthew Davidson (kingmob)17:04:31

OK, maybe I'll try that.

Matthew Davidson (kingmob)05:04:31

But "resolve: none" only works inside macro bodies. It won't help with def-ing macros when the var defined is used elsewhere, right?


Right, it’s mostly used for DSL-type macros where there are a lot of internal local symbols.


Which are the macros that don’t work from Manifold & Potemkin? I did add support for them a while ago, but I’m not sure if they’ve changed in the meantime.

Matthew Davidson (kingmob)09:04:43

I'd have to investigate, see what the current state is, disable kondo, and check what's broken in Cursive. Potemkin has barely changed in years. Manifold's changed a bit, but not the core macros.

Matthew Davidson (kingmob)09:04:57

(I'm sure it doesn't help that manifold has some requires in mid-file. And temporarily changes ns mid-file at one point!)

Matthew Davidson (kingmob)09:04:03

OK, looks like Cursive isn't natively supporting potemkin's deftype+, for one. I had to add a "resolve as" in my Manifold setup.


Ok, but with that option set it works ok?


Yes, I remember having to add functionality to support the crazy shit manifold did, around namespace self-references.

Matthew Davidson (kingmob)09:04:53

Yes. Manifold looks pretty ok otherwise. Maybe more of my issues are in Aleph.

Matthew Davidson (kingmob)09:04:56

> Yes, I remember having to add functionality to support the crazy shit manifold did, around namespace self-references. Yeah, I'd like to fix that... one day. I mean technially, the code's not wrong, but static linters are deeply incompatible with dynamic metaprogramming, which is kind of sad.


Are your problems when using the libraries, or working on the library itself? I seem to recall with Potemkin that I fixed it enough for users of the library, but probably not maintainers.

Matthew Davidson (kingmob)05:04:46

As maintainer. I'm the current maintainer of Aleph and Manifold. (And technically Potemkin, I guess, but I have little time or energy to fool with it.) But it's sort of both, though. I'm mostly working on Aleph, but that means I use Manifold and Potemkin.

Matthew Davidson (kingmob)05:04:18

I know my situation is kind of unique. 😄

Matthew Davidson (kingmob)09:04:24

OK, here's an example I just ran into, if it helps any. I'm editing Aleph, and looking at ChannelSink. Cursive doesn't understand Manifold's def-sink macro, because it doesn't know that it automatically inserts some interfaces in the macro definition, so all the methods associated with the interfaces are either not found, or confused for other fns.


greetings! Is there a way to customize how Print Last Exception button prints stack trace? (I want it printed in reverse order, so I'd not need to scroll up for almost every exception)


(did it with new bound repl command btw, tools->repl->commands is a top level window drop down menu path, not a preferences dialog path)