Fork me on GitHub
#clj-kondo
<
2022-01-19
>
borkdude11:01:17

Announcement! clojure-extras, an IntelliJ plugin which brings clj-kondo + inline-eval to Cursive, v0.5.0! https://plugins.jetbrains.com/plugin/18108-clojure-extras/https://t.co/SxPSepJaJb It now has an option to analyze the classpath with clj-kondo for better linting results, and more! Join the #clj-extras-plugin to discuss the plugin in detail.

emccue19:01:18

Does this provide support for hooks in any way? Like could i teach cursive about my macros now, or is that functionality still requiring clojure-lsp

borkdude19:01:46

yes, supported

borkdude19:01:12

as far as linting is concerned. navigation etc is still isolated in cursive itself

emccue19:01:32

i’ll need to try it out. that could be a game changer

sashton19:01:56

I have a library which defines some resources/clj-kondo.exports. In a separate application, which uses that library as a dependency, after clojure-lsp initializes and runs clj-kondo stuff I end up with a .clj-kondo/my.lib folder. However, I don’t have a .clj-kondo/config.edn in my application, nor in my ~/.config/clj-kondo directory. It was my impression that a config.edn containing a {:config-paths ["my/lib"]} would be required to pull in the lib’s stuff. Does clj-kondo scan the classpath automatically for resources/clj-kondo.exports` directories, and import them automatically?

borkdude19:01:29

@sashton clojure-lsp runs clj-kondo with --copy-configs while linting your classpath, this is why it copies them to your local config. it also creates a .clj-kondo dir if doesn't exist yet. in recent versions, clj-kondo automatically loads the exported config from your config dir, so there is no need for :config-paths anymore for exported configs.

sashton19:01:11

So it sounds like I won’t need to use config-paths in this case? Or is config-paths for a separate use-case?

borkdude19:01:40

for this case you don't need it, you may still need it in some cases, e.g. when exporting a config for your own library and you would like to use it in linting for the same project

sashton19:01:38

makes sense, thanks!