Skip to content

Use worktree environment for spawning the language server#24

Merged
MrSubidubi merged 3 commits intozed-extensions:mainfrom
SKalt:fix/respect-worktree-env
Feb 3, 2026
Merged

Use worktree environment for spawning the language server#24
MrSubidubi merged 3 commits intozed-extensions:mainfrom
SKalt:fix/respect-worktree-env

Conversation

@SKalt
Copy link
Contributor

@SKalt SKalt commented Jan 28, 2026

This also prefers any executable on PATH named bash-language-server.

Fixes #2.

This also prefers any executable on PATH named bash-language-server.
@cla-bot
Copy link

cla-bot bot commented Jan 28, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @SKalt on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@SKalt
Copy link
Contributor Author

SKalt commented Jan 28, 2026

@cla-bot check

@cla-bot
Copy link

cla-bot bot commented Jan 28, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @SKalt on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@cla-bot
Copy link

cla-bot bot commented Jan 28, 2026

The cla-bot has been summoned, and re-checked this pull request!

@SKalt
Copy link
Contributor Author

SKalt commented Jan 28, 2026

@cla-bot check

@cla-bot cla-bot bot added the cla-signed label Jan 28, 2026
@cla-bot
Copy link

cla-bot bot commented Jan 28, 2026

The cla-bot has been summoned, and re-checked this pull request!

@MrSubidubi MrSubidubi changed the title refactor: use worktree env for spawning the language server. Use worktree environment for spawning the language server Feb 2, 2026
Copy link
Contributor

@MrSubidubi MrSubidubi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! Looks good, could you quickly elaborate as to why the language server needs the environment? Is it for the stuff at https://github.com/bash-lsp/bash-language-server/blob/c6b9bdac071a064bd697159e3da733adaf46ab33/server/src/config.ts#L82-L102?

Code-wise looks good, just would like to know the reasoning. Thanks!

@SKalt
Copy link
Contributor Author

SKalt commented Feb 2, 2026

The language server needs $PATH from the worktree-specific environment to pick a project-specific installation of shellcheck. (Not detecting bash-language-server and shellcheck installed with mise is the problem that inspired this contribution).

MrSubidubi
MrSubidubi previously approved these changes Feb 2, 2026
Copy link
Contributor

@MrSubidubi MrSubidubi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thank you for the context! One quesrtion and we should be good to go

Copy link
Contributor

@MrSubidubi MrSubidubi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this and congratulations to your first contribution! 🎉

@MrSubidubi MrSubidubi enabled auto-merge (squash) February 3, 2026 16:43
@MrSubidubi MrSubidubi disabled auto-merge February 3, 2026 23:37
@MrSubidubi MrSubidubi merged commit acfeb62 into zed-extensions:main Feb 3, 2026
5 checks passed
@MrSubidubi
Copy link
Contributor

Well, the beauty of GitHub - should have worked earlier, but only now did after manual action..

Anyway, thanks, fix will soon roll out!

@SKalt SKalt deleted the fix/respect-worktree-env branch February 4, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support manually installed LSP

2 participants