Skip to content

Conversation

@ian-h-chamberlain
Copy link
Contributor

Relates to #35759, but maybe doesn't entirely fix it? I think it will improve the situation, at least.
Also provides a workaround for the issue described in #40094 (comment) for users of WSL + nix-direnv.

Rationale: there are cases where automatic direnv integration is not always desirable, but Zed currently has no way of opting out of this integration besides direnv revoke (which is often not desirable).

This PR provides such an opt-out for users who run into problems with the existing direnv integration methods. Some reasons why disabling might be useful:

Release Notes:

  • Added the ability to disable direnv integration entirely
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Nov 28, 2025
@zed-industries-bot
Copy link

zed-industries-bot commented Nov 28, 2025

Messages
📖

This PR includes links to the following GitHub Issues: #40094
If this PR aims to close an issue, please include a Closes #ISSUE line at the top of the PR body.

Generated by 🚫 dangerJS against ea317eb

@ian-h-chamberlain ian-h-chamberlain changed the title direnv: allow disabling env integration entirely Nov 28, 2025
@Veykril Veykril self-assigned this Nov 29, 2025
Copy link
Member

@Veykril Veykril left a comment

Choose a reason for hiding this comment

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

Sounds reasonable to me, thanks!

@Veykril Veykril merged commit db86feb into zed-industries:main Dec 1, 2025
25 checks passed
someone13574 pushed a commit to someone13574/zed that referenced this pull request Dec 16, 2025
Relates to zed-industries#35759, but maybe doesn't entirely fix it? I think it will
improve the situation, at least.
Also provides a workaround for the issue described in
zed-industries#40094 (comment)
for users of WSL + `nix-direnv`.

Rationale: there are cases where automatic direnv integration is not
always desirable, but Zed currently has no way of opting out of this
integration besides `direnv revoke` (which is often not desirable).

This PR provides such an opt-out for users who run into problems with
the existing direnv integration methods. Some reasons why disabling
might be useful:
- Security concerns about auto-loading `.envrc` (arguably, `direnv
revoke` should cover this most of the time)
- As in zed-industries#35759, for users who use different shells/envs for
interactive/non-interactive cases and want to manually control the
environment Zed uses
- As in zed-industries#40094, to workaround OS limits on environment variable /
command-line parameter size


Release Notes:

- Added the ability to disable direnv integration entirely
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

3 participants