project: Use user configured shells for project env fetching (#41288)

Closes https://github.com/zed-industries/zed/issues/40464

Release Notes:

- Fix shell environment sourcing not respecting users remote shells
This commit is contained in:
Lukas Wirth
2025-11-03 16:29:07 +00:00
committed by GitHub
parent a6b177d806
commit 38e1e3f498
12 changed files with 177 additions and 153 deletions
+7 -5
View File
@@ -60,8 +60,10 @@ async fn lsp_task_context(
buffer: &Entity<Buffer>,
cx: &mut AsyncApp,
) -> Option<TaskContext> {
let worktree_store = project
.read_with(cx, |project, _| project.worktree_store())
let (worktree_store, environment) = project
.read_with(cx, |project, _| {
(project.worktree_store(), project.environment().clone())
})
.ok()?;
let worktree_abs_path = cx
@@ -74,9 +76,9 @@ async fn lsp_task_context(
})
.ok()?;
let project_env = project
.update(cx, |project, cx| {
project.buffer_environment(buffer, &worktree_store, cx)
let project_env = environment
.update(cx, |environment, cx| {
environment.buffer_environment(buffer, &worktree_store, cx)
})
.ok()?
.await;