Skip to content

Commit

Permalink
Fix leading slash on windows (zed-industries#20559)
Browse files Browse the repository at this point in the history
  • Loading branch information
someone120 committed Jan 3, 2025
1 parent f6dabad commit e6d08e4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions crates/language_extension/src/extension_lsp_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,15 @@ impl LspAdapter for ExtensionLspAdapter {
.context("failed to set file permissions")?;
}
}

let mut arguments = command.args;
#[cfg(target_os = "windows")]
{
arguments[0] = arguments[0].trim_start_matches("/").to_string();
}
let arguments = arguments.into_iter().map(|arg| arg.into()).collect();
Ok(LanguageServerBinary {
path,
arguments: command.args.into_iter().map(|arg| arg.into()).collect(),
arguments,
env: Some(command.env.into_iter().collect()),
})
}
Expand Down

0 comments on commit e6d08e4

Please sign in to comment.