calva

pez 2025-03-18T18:22:38.065909Z

PSA: Some files stop working in VS Code Insiders 1.99.

pez 2025-03-18T18:33:07.810079Z

It looks like a VS Code issue, that gets triggered by clojure-lsp semantic tokens, so if you run in to it you can merge your .lsp/config.edn file with this:

{:semantic-tokens? false}

Colin P. Hill 2025-03-18T20:41:41.539359Z

I kept wondering why I suddenly had two workspace roots listed in clojure-lsp...and then I realized I had a file named project.clj in my source tree, named for a relevant domain concept 🤦 I'm honestly not sure what a solution would look like, but it may be valuable to have a way out of this edge case besides renaming the file.

ericdallo 2025-03-18T20:42:53.057939Z

I had the same problem in clojure-lsp-intellij project itself hehe, it turns out this is client responsibility, so editors (calva in this case) should send the project root uri to clojure-lsp

pez 2025-03-18T21:23:58.670189Z

What does it mean > two workspace roots listed in clojure-lsp ?

Colin P. Hill 2025-03-18T21:25:24.994259Z

Colin P. Hill 2025-03-18T21:25:31.360069Z

Similar appears when I launch a REPL

pez 2025-03-18T21:33:47.934189Z

I see. Yes, it’s a pretty shallow check we do. Easiest way out of the edge case would be that you pretend it’s not there. 😃 But I think it should work with adding the directory to the project roots exclude setting. Search for calva.projectRootsSearchExclude in the settings window.

Colin P. Hill 2025-03-18T21:34:57.769289Z

Ahh, didn't see that setting. Confirmed that it works. Thanks!

Colin P. Hill 2025-03-18T21:35:19.358439Z

The problem with pretending it's not there was of course that it totally ruined my muscle memory for jacking in – an extra interaction I wasn't used to!

pez 2025-03-18T21:36:47.142789Z

Ah, yeah, you don’t get that prompt now that there is only one project?

Colin P. Hill 2025-03-18T21:37:16.267749Z

Right. If there's only one, it just goes with that one.

pez 2025-03-18T21:38:28.271279Z

Gotcha. Good that that setting did the trick. It has an entirely different purpose. (Saving you from waiting for ages while Calva hunts for project files in some irrelevant directories.)

Colin P. Hill 2025-03-18T21:39:32.884669Z

It's always nice to have a hammer at hand and encounter a problem that truly is a nail.

pez 2025-03-18T21:39:46.962859Z

A sort-of-nail 😃