languages: Allow installing pre-release of rust-analyzer and clangd (#37530)

Release Notes:

- Added lsp binary config to allow fetching nightly rust-analyzer and
clangd releases
This commit is contained in:
Lukas Wirth
2025-09-04 09:22:19 +00:00
committed by GitHub
parent b7ad20773c
commit fca44f89c1
17 changed files with 87 additions and 11 deletions
+3 -1
View File
@@ -395,6 +395,7 @@ pub trait LspAdapter: 'static + Send + Sync {
async fn fetch_latest_server_version(
&self,
delegate: &dyn LspAdapterDelegate,
cx: &AsyncApp,
) -> Result<Box<dyn 'static + Send + Any>>;
fn will_fetch_server(
@@ -605,7 +606,7 @@ async fn try_fetch_server_binary<L: LspAdapter + 'static + Send + Sync + ?Sized>
delegate.update_status(name.clone(), BinaryStatus::CheckingForUpdate);
let latest_version = adapter
.fetch_latest_server_version(delegate.as_ref())
.fetch_latest_server_version(delegate.as_ref(), cx)
.await?;
if let Some(binary) = adapter
@@ -2222,6 +2223,7 @@ impl LspAdapter for FakeLspAdapter {
async fn fetch_latest_server_version(
&self,
_: &dyn LspAdapterDelegate,
_: &AsyncApp,
) -> Result<Box<dyn 'static + Send + Any>> {
unreachable!();
}