summaryrefslogtreecommitdiff
path: root/helix-lsp/src/lib.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2022-04-01 02:20:41 +0000
committerBlaž Hrastnik2022-04-01 02:20:41 +0000
commit8adf0c1b3a7a2173c80a86da5d435288bab456de (patch)
treee99b3d67ba027fbd1e3f4428a078d6d28a8f2ab2 /helix-lsp/src/lib.rs
parent236c6b77077596f8c7b5a5377e23e96ecec45e07 (diff)
lsp: Implement support for workspace_folders (currently just one)
Refs #1898
Diffstat (limited to 'helix-lsp/src/lib.rs')
-rw-r--r--helix-lsp/src/lib.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/helix-lsp/src/lib.rs b/helix-lsp/src/lib.rs
index 389dfb4d..76748136 100644
--- a/helix-lsp/src/lib.rs
+++ b/helix-lsp/src/lib.rs
@@ -191,6 +191,7 @@ pub mod util {
pub enum MethodCall {
WorkDoneProgressCreate(lsp::WorkDoneProgressCreateParams),
ApplyWorkspaceEdit(lsp::ApplyWorkspaceEditParams),
+ WorkspaceFolders,
WorkspaceConfiguration(lsp::ConfigurationParams),
}
@@ -210,6 +211,7 @@ impl MethodCall {
.expect("Failed to parse ApplyWorkspaceEdit params");
Self::ApplyWorkspaceEdit(params)
}
+ lsp::request::WorkspaceFoldersRequest::METHOD => Self::WorkspaceFolders,
lsp::request::WorkspaceConfiguration::METHOD => {
let params: lsp::ConfigurationParams = params
.parse()
@@ -320,7 +322,7 @@ impl Registry {
&config.command,
&config.args,
language_config.config.clone(),
- language_config.roots.clone(),
+ &language_config.roots,
id,
)?;
self.incoming.push(UnboundedReceiverStream::new(incoming));