Fork me on GitHub
#cursive
<
2019-04-18
>
claudiu05:04:56

hi, just curious. Is there something I need to enable to have cursive let me know when I'm not using something I imported ? Seems to work for :as hiccups but not for the values in :refer [x y z]

helios08:04:50

Consider that sometimes you want to include a namespace just because you want it to be loaded when evaluating the current namespace. I actually remove the :as on purpose so Cursive won't throw me a warning 😕

claudiu08:04:55

yep. I also do that for namespaces with multimethods or stuff like mount. But it would be nice if cursive would check for unused stuff in :refer I usually end up with a few of those when refactoring 😄 Asked because it seems like "low hanging fruit", it's probably not given the age of the issue

helios08:04:19

Yeah mount is my primary use case. Unused refer sounds like a lovely feature 🙂

dadair17:04:10

I’m sure this has been asked before, but the clojurians log search result throws an exception, so I can’t read the prior answer, but does Cursive have any support for HugSQL ghost definitions, something like https://github.com/rkaercher/hugsql-ghosts?

dmarjenburgh18:04:13

The com.datomic/ion lib comes aot-compiled (no clojure source) so Cursive can’t resolve the names. Is there a way to handle this (via some extern file or something?)

vemv20:04:13

> Cursive does type inference (or propagation, really) in the editor https://news.ycombinator.com/item?id=13918567 Just curious, is this implemented in such a way that it can be ever open-sourced as a general-purpose lib? Having some heuristics for determining the return value of defn foo could have quite some applications I know there's typed-clojure and spectrum but I'm looking for something relatively lightweight and unassuming (no core.typed, no spec, etc)

cfleming21:04:02

@claudiu No, that doesn’t work right now, but I’m actually planning to add that soon as part of some namespace refactoring improvements.

bananadance 4
cfleming21:04:05

@dadair No, it doesn’t - I’ve never seen that before. It looks interesting, thanks!

cfleming21:04:25

@dmarjenburgh I’ll have to add it to the list of things that stubs are generated for, thanks.

cfleming21:04:55

@vemv No, it’s not, sorry - it relies on a fair number of IntelliJ/Cursive internals.

vemv22:04:29

thanks for letting me know!