Skip to content

Commit 40f5ddf

Browse files
authored
Add --stdio argument to Expert by default (#45)
Closes #41
1 parent c22e0b8 commit 40f5ddf

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/elixir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ impl zed::Extension for ElixirExtension {
3535

3636
Ok(zed::Command {
3737
command: expert_binary.path,
38-
args: expert_binary.args.unwrap_or_default(),
38+
args: expert_binary.args,
3939
env: Default::default(),
4040
})
4141
}

src/language_servers/expert.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use crate::language_servers::util;
99

1010
pub struct ExpertBinary {
1111
pub path: String,
12-
pub args: Option<Vec<String>>,
12+
pub args: Vec<String>,
1313
}
1414

1515
pub struct Expert {
@@ -35,7 +35,8 @@ impl Expert {
3535
.and_then(|lsp_settings| lsp_settings.binary);
3636
let binary_args = binary_settings
3737
.as_ref()
38-
.and_then(|binary_settings| binary_settings.arguments.clone());
38+
.and_then(|binary_settings| binary_settings.arguments.clone())
39+
.unwrap_or_else(|| vec!["--stdio".to_string()]);
3940

4041
if let Some(path) = binary_settings.and_then(|binary_settings| binary_settings.path) {
4142
return Ok(ExpertBinary {

0 commit comments

Comments
 (0)