Description
Add support for LSP's workspaceFolders feature.
The TypeFox LSP server together with a tsserver instance consume around 150MB of memory without even loading a project. An IDE user will generally have multiple TypeScript projects open, simply because even navigating to a dependency in node_modules
already means navigating to a different TypeScript project. LSP's workspaceFolders feature allows re-using a single LSP server for multiple TypeScript projects, which would greatly reduce memory consumption.
Note that one problem with supporting workspaceFolders is that currently we try to start the tsserver that is located inside the node_modules of the opened project, see the code. With multiple projects, it becomes unclear which tsserver to start. In this scenario, I think the default should be to use the globally installed tsserver, and otherwise one that is bundled with this LSP server.