Fill capabilities on project (re)join (#35892)

Follow-up of https://github.com/zed-industries/zed/pull/35682

Release Notes:

- N/A

Co-authored-by: Smit Barmase <smit@zed.dev>
This commit is contained in:
Kirill Bulatov 2025-08-08 23:12:41 +03:00 committed by GitHub
parent 024a5bbcd0
commit e0fc32009f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 4 deletions

View file

@ -7768,12 +7768,19 @@ impl LspStore {
pub(crate) fn set_language_server_statuses_from_proto(
&mut self,
language_servers: Vec<proto::LanguageServer>,
server_capabilities: Vec<String>,
) {
self.language_server_statuses = language_servers
.into_iter()
.map(|server| {
.zip(server_capabilities)
.map(|(server, server_capabilities)| {
let server_id = LanguageServerId(server.id as usize);
if let Ok(server_capabilities) = serde_json::from_str(&server_capabilities) {
self.lsp_server_capabilities
.insert(server_id, server_capabilities);
}
(
LanguageServerId(server.id as usize),
server_id,
LanguageServerStatus {
name: LanguageServerName::from_proto(server.name),
pending_work: Default::default(),