Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
clangd: download the correct binary on Linux (#8820)
Thorben Kröger94593dca4bd9
diff --git a/crates/languages/src/c.rs b/crates/languages/src/c.rsindex bad4e0a076d..28ceedf7ad1 100644--- a/crates/languages/src/c.rs+++ b/crates/languages/src/c.rs@@ -1,10 +1,10 @@-use anyhow::{anyhow, Context, Result};+use anyhow::{anyhow, bail, Context, Result};use async_trait::async_trait;use futures::StreamExt;pub use language::*;use lsp::LanguageServerBinary;use smol::fs::{self, File};-use std::{any::Any, path::PathBuf, sync::Arc};+use std::{any::Any, env::consts, path::PathBuf, sync::Arc};use util::{async_maybe,fs::remove_matching,@@ -26,7 +26,12 @@ impl super::LspAdapter for CLspAdapter {) -> Result<Box<dyn 'static + Send + Any>> {let release =latest_github_release("clangd/clangd", true, false, delegate.http_client()).await?;- let asset_name = format!("clangd-mac-{}.zip", release.tag_name);+ let os_suffix = match consts::OS {+ "macos" => "mac",+ "linux" => "linux",+ other => bail!("Running on unsupported os: {other}"),+ };+ let asset_name = format!("clangd-{}-{}.zip", os_suffix, release.tag_name);let asset = release.assets.iter()