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.

Log an error when there are no buffer snapshots for some LSP version (#22934)

Michael Sloanc41b25cc90a2
diff --git a/crates/project/src/lsp_store.rs b/crates/project/src/lsp_store.rs
index a04388d9101..d5aa539ee8d 100644
--- a/crates/project/src/lsp_store.rs
+++ b/crates/project/src/lsp_store.rs
@@ -2006,6 +2006,10 @@ impl LocalLspStore {
snapshots.retain(|snapshot| snapshot.version + OLD_VERSIONS_TO_RETAIN >= version);
Ok(found_snapshot)
} else {
+ match buffer.read(cx).project_path(cx) {
+ Some(project_path) => log::error!("No LSP snapshots found for buffer with path {:?}", project_path.path),
+ None => log::error!("No LSP snapshots found for buffer without a project path (which is also unexpected)"),
+ }
Ok((buffer.read(cx)).text_snapshot())
}
}