Add installation test binaries for all remaining adapters

This commit is contained in:
Julia 2023-06-26 11:54:20 -04:00
parent 5632f24d24
commit 2a8d1343d6
12 changed files with 395 additions and 226 deletions

View file

@ -160,6 +160,10 @@ impl CachedLspAdapter {
.await
}
pub fn can_be_reinstalled(&self) -> bool {
self.adapter.can_be_reinstalled()
}
pub async fn installation_test_binary(
&self,
container_dir: PathBuf,
@ -249,12 +253,14 @@ pub trait LspAdapter: 'static + Send + Sync {
delegate: &dyn LspAdapterDelegate,
) -> Option<LanguageServerBinary>;
fn can_be_reinstalled(&self) -> bool {
true
}
async fn installation_test_binary(
&self,
_container_dir: PathBuf,
) -> Option<LanguageServerBinary> {
unimplemented!();
}
container_dir: PathBuf,
) -> Option<LanguageServerBinary>;
async fn process_diagnostics(&self, _: &mut lsp::PublishDiagnosticsParams) {}
@ -1667,6 +1673,10 @@ impl LspAdapter for Arc<FakeLspAdapter> {
unreachable!();
}
async fn installation_test_binary(&self, _: PathBuf) -> Option<LanguageServerBinary> {
unreachable!();
}
async fn process_diagnostics(&self, _: &mut lsp::PublishDiagnosticsParams) {}
async fn disk_based_diagnostic_sources(&self) -> Vec<String> {