Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

lsp: Handle unregistration "textDocument/rename" from a server (#19427)

Vitaly Slobodin3e0c5c10b73f
diff --git a/crates/project/src/lsp_store.rs b/crates/project/src/lsp_store.rs
index 61f959259d5..fe0a6443bc8 100644
--- a/crates/project/src/lsp_store.rs
+++ b/crates/project/src/lsp_store.rs
@@ -6057,6 +6057,16 @@ impl LspStore {
);
})?;
}
+ "textDocument/rename" => {
+ this.update(&mut cx, |this, _| {
+ if let Some(server) = this.language_server_for_id(server_id)
+ {
+ server.update_capabilities(|capabilities| {
+ capabilities.rename_provider = None
+ })
+ }
+ })?;
+ }
"textDocument/rangeFormatting" => {
this.update(&mut cx, |this, _| {
if let Some(server) = this.language_server_for_id(server_id)