Fix remote server completions not being queried from all LSP servers (#42723)

Closes #41294

Release Notes:

- Fixed remote LSPs not being queried
This commit is contained in:
localcc
2025-11-17 18:07:49 +00:00
committed by GitHub
parent faa1136651
commit fd1494c31a
5 changed files with 303 additions and 31 deletions
+5
View File
@@ -218,6 +218,7 @@ pub(crate) struct GetHover {
pub(crate) struct GetCompletions {
pub position: PointUtf16,
pub context: CompletionContext,
pub server_id: Option<lsp::LanguageServerId>,
}
#[derive(Clone, Debug)]
@@ -2395,6 +2396,7 @@ impl LspCommand for GetCompletions {
buffer_id: buffer.remote_id().into(),
position: Some(language::proto::serialize_anchor(&anchor)),
version: serialize_version(&buffer.version()),
server_id: self.server_id.map(|id| id.to_proto()),
}
}
@@ -2423,6 +2425,9 @@ impl LspCommand for GetCompletions {
trigger_kind: CompletionTriggerKind::INVOKED,
trigger_character: None,
},
server_id: message
.server_id
.map(|id| lsp::LanguageServerId::from_proto(id)),
})
}