clj-kondo

fmjrey 2025-05-26T15:21:43.360169Z

Any known issues when the clojure deps.edn and code lives in a subdirectory of the git project root? I'm using practicalli spacemacs (which uses clojure lsp) and I can see a .clj-kondo dir in the root but not in the clojure subdirectory. In the root .clj-kondo dir there is no imports dir, only .cache

ericdallo 2025-05-26T15:43:00.926379Z

that's expected, you should import as project root in lsp the folder which lives the root deps.edn

👍 1
ericdallo 2025-05-26T15:43:42.707419Z

you can use lsp-workspace-folders-remove to see and remove any wrong imported project root

fmjrey 2025-05-26T15:48:43.943779Z

Thanks @ericdallo, working nicely now!

👍 1
fmjrey 2025-05-26T18:13:16.526979Z

Hmm... having another issue which is probably more about clojure-lsp and/or spacemacs: it seems .dir-locals.el which I use to specify an additional alias is not picked up by clojure-lsp. I had to use the :dev alias instead which seems to be loaded automatically. Is that expected?

ericdallo 2025-05-26T18:16:55.458539Z

yes, clojure-lsp don't check .dir-local.el or any editor specific config, it's agnostic of editors. By default the classpath scan works like https://clojure-lsp.io/settings/#classpath-scan, defaulting to :dev and :test aliases

ericdallo 2025-05-26T18:18:02.136579Z

try to follow this mindset: • check if the default is really not enough • try to use :source-aliases setting • if not enough yet, use the project-specs settings

👍 1
fmjrey 2025-05-26T18:35:53.954999Z

Thanks, :dev will be fine in my case. For the record (and those searching slack for answers) it's about the com.rpl/rama library that is provided by the Rama runtime, but needs to be added during development.

👍 1