mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-04 06:34:26 +00:00
Use same arguments for LSP binary in haskell.rs
This commit is contained in:
parent
0576214be7
commit
faf7798577
1 changed files with 7 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
use std::env::consts::ARCH;
|
||||
use std::ffi::OsString;
|
||||
use std::{any::Any, path::PathBuf};
|
||||
|
||||
use anyhow::{anyhow, Context, Result};
|
||||
|
@ -14,6 +15,10 @@ use util::async_maybe;
|
|||
use util::github::latest_github_release;
|
||||
use util::{github::GitHubLspBinaryVersion, ResultExt};
|
||||
|
||||
fn server_binary_arguments() -> Vec<OsString> {
|
||||
vec!["--lsp".into()]
|
||||
}
|
||||
|
||||
pub struct HaskellLspAdapter;
|
||||
|
||||
#[async_trait]
|
||||
|
@ -80,7 +85,7 @@ impl LspAdapter for HaskellLspAdapter {
|
|||
.await?;
|
||||
Ok(LanguageServerBinary {
|
||||
path: binary_path,
|
||||
arguments: vec!["--lsp".into()],
|
||||
arguments: server_binary_arguments(),
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -124,7 +129,7 @@ async fn get_cached_server_binary(container_dir: PathBuf) -> Option<LanguageServ
|
|||
if let Some(path) = last_binary_path {
|
||||
Ok(LanguageServerBinary {
|
||||
path,
|
||||
arguments: Vec::new(),
|
||||
arguments: server_binary_arguments(),
|
||||
})
|
||||
} else {
|
||||
Err(anyhow!("no cached binary"))
|
||||
|
|
Loading…
Reference in a new issue