lsp

eval-on-point 2025-03-11T00:10:58.678789Z

My coworker and I have noticed some of the usage analysis/navigation features of Clojure LSP don't seem to update when we perform git pull --rebase. We often just restart our clojure-lsp session to get updated analysis data. Is this a known phenomenon? Could we be imagining it, and something else is causing the analysis to break? Happy to try to create a minimal example if this sounds like an unknown issue

Akiz 2025-03-17T13:46:25.796609Z

Ah, it is exactly what caused my problem here! https://clojurians.slack.com/archives/CPABC1H61/p1741594519166179

ericdallo 2025-05-16T13:32:17.414459Z

I found some issues in clojure-lsp regarding handling new and removed files, issue https://github.com/clojure-lsp/clojure-lsp/issues/2046

István Karaszi 2025-03-13T10:35:22.428689Z

*`lsp-enable-file-watchers`

ericdallo 2025-03-11T12:56:34.251349Z

there is definitely something broken on this feature indeed, but there are 2 key things to make that work: • client (your editor) needs to have file watchers for when you switch branchs it notice those files were changed and send to LSP via didWatchedFilesChanged request, some editors like Emacs have a limit of those file watchers per performance reasons • server - clojure-lsp needs to receive those batch of requests and analyze the files and their related, I believe here there must be missing something although things were supposed to work. Would be really helpful if you could provide a clojure-lsp issue + a minimal repro like https://github.com/ericdallo/clojure-sample

eval-on-point 2025-03-11T15:56:21.611819Z

Ah thanks for the hint. That is good intuition. I will try to squirrel away some time to try to isolate this. Perhaps it is a deeper issue with Emacs lsp-mode .

ericdallo 2025-03-11T16:24:44.467629Z

there is lsp-enable-file-watch and lsp-file-watch-threshold variables for lsp-mode