unisonweb / vscode-unison

Official Unison extension for Visual Studio Code
MIT License
23 stars 4 forks source link

Don't make a new lsp client for every workspace. #14

Open ChrisPenner opened 7 months ago

ChrisPenner commented 7 months ago

When writing the original extension I followed the multiple-workspaces example, but since you typically only have a single UCM session open, it doesn't make sense to have multiple LSP clients or servers, and it was leading to the unison lsp commands getting redundantly re-registered in VSCode and throwing errors.

I think this new version is simpler and should avoid those issues. If we really need separate workspaces again in the future I can figure out the proper way to do that, but it doesn't seem necessary right now.

aryairani commented 4 months ago

Should we merge this? I don't really have enough knowledge to review it, but I can be a rubber duck about it.

ChrisPenner commented 4 months ago

This was an attempt to fix the issues that you were encountering specifically, but I'm not sure it solved those and am also not sure anyone else has encountered them 🤔

Maybe try it out? I believe you can just open this repo in vscode and hit F5 to test it.

aryairani commented 4 months ago

This was an attempt to fix the issues that you were encountering specifically, but I'm not sure it solved those and am also not sure anyone else has encountered them 🤔

Maybe try it out? I believe you can just open this repo in vscode and hit F5 to test it.

Cool thanks, I will try.