diff options
| author | bors <bors@rust-lang.org> | 2023-02-08 09:14:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-02-08 09:14:01 +0000 |
| commit | 3c89945e78c5f164c03cabb1c5cd459a86ef963a (patch) | |
| tree | abded1b3abec3865feca9598991653b361ba6807 /tests/rustdoc-js-std/parser-errors.js | |
| parent | b7836e44d3fb2bb46d21ca5077142341f983a838 (diff) | |
| parent | c7010eda1ba4e619952be9fe87487c19ec924eaa (diff) | |
| download | rust-3c89945e78c5f164c03cabb1c5cd459a86ef963a.tar.gz rust-3c89945e78c5f164c03cabb1c5cd459a86ef963a.zip | |
Auto merge of #14098 - pascalkuthe:did_change_workspace_folder, r=Veykril
Support DidChangeWorkspaceFolders notifications This PR enables the `WorkspaceFoldersServerCapabilities` capability for rust-analyzer and implemented support for the associated [`DidChangeWorkspaceFolders`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_didChangeWorkspaceFolders) notification to allow clients to update the list of `workspaceFolders` sent during initialization. ## Motivation This allows clients which lazily autodiscover their workspace roots (like the [helix editor](https://github.com/helix-editor/helix) once [my PR](https://github.com/helix-editor/helix/pull/5748) lands) avoid spawning multiple instances of RA. Right now such clients are forced to either: * greedily discover all LSP roots in the workspace (precludes the ability to respond to new workspace roots) * spawn multiple instance of rust-analyzer (one for each root) * restart rust-analyzer whenever a new workspace is added Some example use-cases are shown [here](https://github.com/helix-editor/helix/pull/5748#issuecomment-1421012523). This PR will also improve support for VSCode (and Atom) multi workspaces. ## Implementation The implementation was fairly straightforward as `rust-analyzer` already supports dynamically reloading workspaces, for example on configuration changes. Furthermore, rust-analyzer also already supports auto-discovering internal workspace from the `workspaceFolders` key in the initialization request. Therefore, the necessary logic just needed to be moved to a central place and reused.
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions
