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:
@@ -13070,6 +13070,7 @@ impl LspAdapter for SshLspAdapter {
|
||||
async fn fetch_latest_server_version(
|
||||
&self,
|
||||
_: &dyn LspAdapterDelegate,
|
||||
_: &AsyncApp,
|
||||
) -> Result<Box<dyn 'static + Send + Any>> {
|
||||
anyhow::bail!("SshLspAdapter does not support fetch_latest_server_version")
|
||||
}
|
||||
|
||||
@@ -516,6 +516,12 @@ pub struct BinarySettings {
|
||||
pub ignore_system_version: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, Serialize, Deserialize, PartialEq, Eq, JsonSchema, Hash)]
|
||||
pub struct FetchSettings {
|
||||
// Whether to consider pre-releases for fetching
|
||||
pub pre_release: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, JsonSchema, Hash)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub struct LspSettings {
|
||||
@@ -527,6 +533,7 @@ pub struct LspSettings {
|
||||
/// Default: true
|
||||
#[serde(default = "default_true")]
|
||||
pub enable_lsp_tasks: bool,
|
||||
pub fetch: Option<FetchSettings>,
|
||||
}
|
||||
|
||||
impl Default for LspSettings {
|
||||
@@ -536,6 +543,7 @@ impl Default for LspSettings {
|
||||
initialization_options: None,
|
||||
settings: None,
|
||||
enable_lsp_tasks: true,
|
||||
fetch: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user