From faf77985776bed301c7b9a62bdaef3e6a67c10a3 Mon Sep 17 00:00:00 2001 From: Pseudomata Date: Fri, 26 Jan 2024 15:41:11 -0500 Subject: [PATCH] Use same arguments for LSP binary in `haskell.rs` --- crates/zed/src/languages/haskell.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/zed/src/languages/haskell.rs b/crates/zed/src/languages/haskell.rs index 56699f1618..832907e265 100644 --- a/crates/zed/src/languages/haskell.rs +++ b/crates/zed/src/languages/haskell.rs @@ -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 { + 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