lsp 2026-03-02

I have an odd issue from time to time after buffer reformat: Error running timer: (wrong-type-argument json-value-p "(ns ....

that seems to happen on buffers with emojis & co

✉️ becomes -> ��� and save is prevented

(I am using eglot)

ah! I think it's eglot-booster

We've had some issues where different people on the team experience different clj-kondo linting rules for our dependencies. We don't check in kondo-configs, and we suspect the inconsistencies stems from how lsp runs "import configs". Would it be possible to make lsp run import configs in such a way that the configs are always in sync with library versions in deps.edn?

Actually this sync should always happen otherwise it's a bug. What may happen is someone is having issues with lsp classpath scan during startup and ignoring, starting clojure-lsp in a basic mode

maybe try to rm .lsp/.cache and restart lsp

When should this sync happen?

My expectation was that it would happen when deps.edn changes.

it should happen when clojure-lsp is starting

no, clojure-lsp doesn't auto re-lint classpath when deps.edn yet, only if you restarted it

then it will check that deps.edn changed and change its cached classpath

I see. I very rarely restart Emacs (or lsp, for that matter), so that's probably the source of the problem

lsp-workspace-restart should retrigger the restart

Yeah, but it's a little heavy-handed, and it would be good if it happened automatically when needed.

yes there is a idea to re-lint classpath when that happens, it just that considering the effort it's just easier to restart manually

Restarting lsp by hand isn't really top of mind (and probably shouldn't be!) so this has caused us some grief with inconsistent linting. We're looking into using a git hook to refresh the kondo configs on changes to deps.edn now. Still not ideal, as the hooks must be manually enabled on everyone's machine.

agree, this is something clojure-lsp should take care, feel free to create a issue about it so I can prioritize Even so, a git hook looks too much to me to be honest, how much you change deps.edn daily? never saw Nubank with thousands of projects and people requiring this at that point

It doesn't change often, but people generally never quit/restart Emacs 😅

fair enough

It's been a while since I thought about a dynamic classpath scan, I think it's time to support that

Would be useful 👍