PSA: Some files stop working in VS Code Insiders 1.99.
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}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.
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
What does it mean > two workspace roots listed in clojure-lsp ?
Similar appears when I launch a REPL
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.
Ahh, didn't see that setting. Confirmed that it works. Thanks!
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!
Ah, yeah, you don’t get that prompt now that there is only one project?
Right. If there's only one, it just goes with that one.
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.)
It's always nice to have a hammer at hand and encounter a problem that truly is a nail.
A sort-of-nail 😃