Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix panic in request_multiple_lsp_locally (#22806)
Conrad Irwin0b361e5b7cbf
diff --git a/crates/project/src/lsp_store.rs b/crates/project/src/lsp_store.rsindex 891d77a3a41..90467ec33d9 100644--- a/crates/project/src/lsp_store.rs+++ b/crates/project/src/lsp_store.rs@@ -5592,13 +5592,13 @@ impl LspStore {<R::LspRequest as lsp::request::Request>::Result: Send,<R::LspRequest as lsp::request::Request>::Params: Send,{- debug_assert!(self.upstream_client().is_none());+ let Some(local) = self.as_local() else {+ return Task::ready(Vec::new());+ };let snapshot = buffer.read(cx).snapshot();let scope = position.and_then(|position| snapshot.language_scope_at(position));- let server_ids = self- .as_local()- .unwrap()+ let server_ids = local.language_servers_for_buffer(buffer.read(cx), cx).filter(|(adapter, _)| {scope