lsp

borkdude 2025-06-03T14:02:16.276509Z

I can't make lsp disable "report-duplicates". This caused some confusion between running clj-kondo from the command line and using it via clojure-lsp. Linting this file has no errors in vanilla clj-kondo:

#_:clj-kondo/ignore
(nippy/freeze 1)

(nippy/dude)
but in lsp you see an unresolved namespace on the second form. You should be able to disable this with
{:report-duplicates false}
in lsp according to the docs.

borkdude 2025-06-03T14:03:32.964099Z

Configuring

{:linters {:unresolved-namespace {:report-duplicates false}}}
also doesn't work. I think just that should be already honored in lsp. It's unfortunate that lsp aggressively overrides clj-kondo's default config here.

ericdallo 2025-06-03T15:39:11.669059Z

This lives under LSP settings :linters :clj-kondo -report-duplicates https://github.com/clojure-lsp/clojure-lsp/blob/master/lib%2Fsrc%2Fclojure_lsp%2Fkondo.clj#L263

ericdallo 2025-06-03T15:39:50.844519Z

But if kondo has a config for that on their side, we can check that too, I think at that time kondo didn't have a config, only a flag to pass, not sure

ericdallo 2025-06-03T15:40:13.596859Z

But issue / PR welcome to honor that if not working

borkdude 2025-06-03T16:58:58.925489Z

Ah got it. {:linters {:clj-kondo {:report-duplicates false}}} I had {:report-duplicates true}. Probably I misunderstood: https://clojure-lsp.io/settings/#clj-kondo clj-kondo doesn't have a global "report-duplicates" setting, it's per linter as you can see in the code you pointed at and lsp will always override it with one and the same boolean from the lsp config, it seems