Fork me on GitHub

When using clojure-lsp in emacs, if I have an unused function then lsp will show me a clojure-lsp/unused-public-var warning. Is there a way to also show this warning for unused re-frame events and subscriptions? I can see when one of these re-frame handlers has 0 references, but clojure-lsp doesn't register that as any kind of warning.


I doubled checked clojure-lsp code and we didn't exclude re-frame handlers or subscriptions, it should warn as unused


oh, I think re-frame is considered a :keyword not a :var-definition on kondo-eyes, I think that's the reason for we don't check for unused public vars for reg-*


That would make sense, I guess the functionality I want would need to be enabled in clj-kondo somehow, probably with a code change


what I think it makes sense is to fix clojure-lsp to consider those keywords as var definitions and then clojure-lsp will warn by default the unused-public-var like it does for other definitions, if user doesn't want that it can still be changed via the linters clj-kondo config normally


could you open a issue please?