windows: User installed language server support (#9606)
Release Notes: - N/A
This commit is contained in:
parent
4183805a39
commit
0f15fd37d6
1 changed files with 9 additions and 0 deletions
|
@ -9540,6 +9540,7 @@ impl LspAdapterDelegate for ProjectLspAdapterDelegate {
|
|||
self.shell_env.lock().as_ref().cloned().unwrap_or_default()
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
async fn which(&self, command: &OsStr) -> Option<PathBuf> {
|
||||
let worktree_abs_path = self.worktree.abs_path();
|
||||
self.load_shell_env().await;
|
||||
|
@ -9551,6 +9552,14 @@ impl LspAdapterDelegate for ProjectLspAdapterDelegate {
|
|||
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()
|
||||
}
|
||||
|
||||
fn update_status(
|
||||
&self,
|
||||
server_name: LanguageServerName,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue