Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
lsp: Add `detail` to completion resolvable properties (#45985)
Shuhei Kadowaki8829f1d1d0d0
diff --git a/crates/lsp/src/lsp.rs b/crates/lsp/src/lsp.rsindex 36938f62a30..c9408b537eb 100644--- a/crates/lsp/src/lsp.rs+++ b/crates/lsp/src/lsp.rs@@ -761,6 +761,7 @@ impl LanguageServer {properties: vec!["additionalTextEdits".to_string(),"command".to_string(),+ "detail".to_string(),"documentation".to_string(),// NB: Do not have this resolved, otherwise Zed becomes slow to complete things// "textEdit".to_string(),diff --git a/crates/project/src/lsp_store.rs b/crates/project/src/lsp_store.rsindex d9c74da8cb9..19660526ebd 100644--- a/crates/project/src/lsp_store.rs+++ b/crates/project/src/lsp_store.rs@@ -6537,8 +6537,9 @@ impl LspStore {let mut new_label = match completion_item {Some(completion_item) => {- // NB: Zed does not have `details` inside the completion resolve capabilities, but certain language servers violate the spec and do not return `details` immediately, e.g. https://github.com/yioneko/vtsls/issues/213- // So we have to update the label here anyway...+ // Some language servers always return `detail` lazily via resolve, regardless of+ // the resolvable properties Zed advertises. Regenerate labels here to handle this.+ // See: https://github.com/yioneko/vtsls/issues/213let language = snapshot.language();match language {Some(language) => {