Closed ckipp01 closed 3 years ago
I would have to ping @rwols for this. Worse case we can do a check before the initialize request, I think
You can choose to not start the server subprocess by returning an explanatory string in AbstractPlugin.can_start
(ST4 only)
Or you can mutate the workspace folders just before starting the subprocess in AbstractPlugin.on_pre_start
(ST4 only)
As a follow-up to https://github.com/scalameta/metals/pull/2391, the NPE should be avoided now and a message shown if a user just opens up a Scala file. However, without having any
rootUri
set, a lot of the functionality that is possible won't happen. I'm curios how much of the LSP api from the LSP package is exposed and if it's possible to detect if no root is there, just set the parent as the root. I know Neovim makes this super easy, as you can see here. Would this at all be possible in the Sublime extension until we do a proper refactoring on the Metals side to handle this case?