Fork me on GitHub
#calva
<
2021-08-28
>
Pepijn de Vos16:08:46

How do I make Calva understand some def* macro declares a symbol instead of making my whole file red?

pez16:08:44

@pepijndevos We should document this, but basically you configure clj-kondo to treat those macros the same as def or whatever is the closest match.

borkdude16:08:25

@pepijndevos In .clj-kondo/config.edn: {:lint-as {your.ns/your-def clojure.core/def}}

borkdude16:08:37

or clojure.core/defn (depending on what it does)

Pepijn de Vos16:08:45

awesome thanks

Pepijn de Vos16:08:09

Amazing, it works

Pepijn de Vos17:08:07

Hm well that joy was short lived, as the Rum macro has some weird extras before the argument list that throws of the rest. Is def-catch-all what I want here?

borkdude17:08:33

Feel free to ask in #clj-kondo for more info on clj-kondo config

borkdude17:08:41

Those hooks actually expand the rum macros in such a way that clj-kondo fully understands them