Fork me on GitHub
#clj-kondo
<
2021-03-25
>
snoe03:03:30

Two more questions: would it be possible to add #_ handling to skip-comments or, rather, where should I add similar behaviour? This is biting me all the time, when I have temporarily ignored code and try to get the signature of a function and come up empty because there's no analysis for the form.

snoe03:03:35

For keyword def analysis (and I admit I might be too late to this convo) in the old version of lsp, it was nice to mark a re-frame keyword as a definition and get the signature of the associated function. So (rf/reg-sub ::foobar (fn [db [_ foobar]] ...)) would allow you to hover on ::foobar elsewhere in the code and see the [db [_ foobar]] signature. I've been missing this more and more lately, and it would be nice if analysis could provide it.

borkdude12:03:58

@snoe question 1: not sure what you mean, sorry. Can you post the idea here? https://github.com/clj-kondo/clj-kondo/discussions/categories/ideas with more explanation? It's easier for me to track than Slack discussions when it's a longer idea question 2: I think we should just add built-in support for re-frame to get the right definition, since it's such a common library

snoe15:03:51

1. will do. 2. there are other libraries like kee-frame that would need similar. So re-frame makes sense to be build in but there's probably needs to be more to the hooks api and a place to add signatures to keyword analysis.

borkdude15:03:15

@snoe don't we already have this function, reg-keyword-def or something?

snoe15:03:57

yup, but no way to associate a signature

borkdude15:03:44

Can you make a separate discussion for this on Github at https://github.com/clj-kondo/clj-kondo/discussions/categories/ideas?

👍 3