summaryrefslogtreecommitdiff
path: root/helix-lsp/src/lib.rs
diff options
context:
space:
mode:
authorTriton1712022-02-28 08:57:22 +0000
committerGitHub2022-02-28 08:57:22 +0000
commitf044059a2a44c65533aa4704fffd911476060c05 (patch)
tree1aa79c761b570109c4ca683b8770ab7336a05d26 /helix-lsp/src/lib.rs
parentc15996aff597aa8cb63850c6080bc69470bb84a5 (diff)
Implement LSP `workspace/configuration` and `workspace/didChangeConfiguration` (#1684)
* Implement LSP `workspace/configuration` request * Implement LSP `workspace/didChangeConfiguration` notification. * Simplify retrieval of LSP configuration * Implement suggestions from PR discussion Co-authored-by: Triton171 <triton0171@gmail.com>
Diffstat (limited to 'helix-lsp/src/lib.rs')
-rw-r--r--helix-lsp/src/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/helix-lsp/src/lib.rs b/helix-lsp/src/lib.rs
index 109546d0..389dfb4d 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),
+ WorkspaceConfiguration(lsp::ConfigurationParams),
}
impl MethodCall {
@@ -209,6 +210,12 @@ impl MethodCall {
.expect("Failed to parse ApplyWorkspaceEdit params");
Self::ApplyWorkspaceEdit(params)
}
+ lsp::request::WorkspaceConfiguration::METHOD => {
+ let params: lsp::ConfigurationParams = params
+ .parse()
+ .expect("Failed to parse WorkspaceConfiguration params");
+ Self::WorkspaceConfiguration(params)
+ }
_ => {
log::warn!("unhandled lsp request: {}", method);
return None;