danhuynhdev/sorbet-lsp

Support for multiple folders in workspaces

Opened this issue · 2 comments

First off, thanks for your work on a great extension!

I have a Code workspace which has two Ruby projects within, and both are configured to use Sorbet.

The first workspace folder works great - all of the LSP features work as expected.

But if I open a Ruby file in the second workspace, I get errors from the LSP that it can't find the file, e.g.:

[Error - 11:56:10 AM] Request textDocument/hover failed.
  Message: Did not find file at uri file:///Users/me/my_second_workspace/my_second_workspace_file.rb in textDocument/hover
  Code: -32602 

Apologies in advance - I don't have much knowledge around the sorbet LSP or VSCode extensions. I assume there's some extra work needed to allow the extension to work with multiple root folders in a workspace. If so, I'd like to kindly request this as a new feature!

Or if not, please let me know what I'm doing wrong 😄

Sorbet's lsp server is designed with a single root folder in mind. This extension is only a wrapper for their lsp server, so I don't think there is anything I can do on my side.

@danhuynhdev I'm pretty sure the solution would be to have multiple lsp servers running, one for each workspace.