Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions crates/project/src/lsp_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12755,7 +12755,6 @@ impl LspAdapterDelegate for LocalLspAdapterDelegate {
return Ok(None);
}

#[cfg(not(target_os = "windows"))]
async fn which(&self, command: &OsStr) -> Option<PathBuf> {
let mut worktree_abs_path = self.worktree_root_path().to_path_buf();
if self.fs.is_file(&worktree_abs_path).await {
Expand All @@ -12765,14 +12764,6 @@ impl LspAdapterDelegate for LocalLspAdapterDelegate {
which::which_in(command, shell_path.as_ref(), worktree_abs_path).ok()
}

#[cfg(target_os = "windows")]
async fn which(&self, command: &OsStr) -> Option<PathBuf> {
// todo(windows) Getting the shell env variables in a current directory on Windows is more complicated than other platforms
// there isn't a 'default shell' necessarily. The closest would be the default profile on the windows terminal
// SEE: https://learn.microsoft.com/en-us/windows/terminal/customize-settings/startup
which::which(command).ok()
}

async fn try_exec(&self, command: LanguageServerBinary) -> Result<()> {
let mut working_dir = self.worktree_root_path().to_path_buf();
if self.fs.is_file(&working_dir).await {
Expand Down
Loading