From 649557cb9831543c2a76279a55fbbf4f99ce59be Mon Sep 17 00:00:00 2001 From: Vitaly Slobodin Date: Fri, 18 Oct 2024 20:42:57 +0200 Subject: [PATCH] lsp: Handle unregistration "textDocument/rename" from a server --- crates/project/src/lsp_store.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/project/src/lsp_store.rs b/crates/project/src/lsp_store.rs index 61f959259d5ab..fe0a6443bc811 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)