Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🤦 detect_venv setting does nothing #15699

Closed
1 task done
injust opened this issue Aug 2, 2024 · 5 comments
Closed
1 task done

🤦 detect_venv setting does nothing #15699

injust opened this issue Aug 2, 2024 · 5 comments
Labels
setting Feedback for preferences, configuration, etc support User support (non-defect troubleshooting, documentation, etc)

Comments

@injust
Copy link
Contributor

injust commented Aug 2, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Configuring the detect_venv setting does nothing, and it is impossible to disable the feature.

  1. When I set "detect_venv": { "on": { "activate_script": "fish" }} to fix Python config: terminal.detect_venv.activate_script default should detect user's shell #11246, Zed still tries to activate the venv using the default script.
  2. When I set "detect_venv": "off", nothing changes.

Because of this, every new terminal session spews a fish error.

Environment

Zed: v0.146.5 (Zed)
OS: macOS 14.6.0
Memory: 16 GiB
Architecture: x86_64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log
@injust injust added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Aug 2, 2024
@injust
Copy link
Contributor Author

injust commented Aug 2, 2024

🤦 This was me setting detect_venv as a top-level option, instead of terminal.detect_venv.

@injust injust closed this as completed Aug 2, 2024
@injust injust changed the title detect_venv setting does nothing 🤦 detect_venv setting does nothing Aug 3, 2024
@notpeter notpeter added setting Feedback for preferences, configuration, etc support User support (non-defect troubleshooting, documentation, etc) and removed bug [core label] triage Maintainer needs to classify the issue admin read Pending admin review labels Aug 3, 2024
@iteroji
Copy link

iteroji commented Sep 15, 2024

I believe that the default option should auto-detect the user's login shell instead of just sourcing .venv/bin/activate.
I understand that the activation script can be explicitly set to fish , csh or nushell but this only works if all team members working on the project use the same shell.

If that is not a common enough scenario to implement it, then can someone suggest an alternative way? Is there a way to call a shell script when a terminal starts?

@injust
Copy link
Contributor Author

injust commented Sep 15, 2024

I believe that the default option should auto-detect the user's login shell instead of just sourcing .venv/bin/activate.

#11246 covers this.

I understand that the activation script can be explicitly set to fish , csh or nushell but this only works if all team members working on the project use the same shell.

@iteroji How are you sharing your Zed config with other team members? That's not an expected use case -- your Zed config should be local to you only.

@iteroji
Copy link

iteroji commented Sep 15, 2024

@iteroji How are you sharing your Zed config with other team members? That's not an expected use case -- your Zed config should be local to you only.

I'm sharing the project settings as part of the project repo, not the global settings. Can I partially override global settings, such as the directories in detect_env? Because in that case it would be easier to leave the activation_script out of the project settings, and only override the directories part.

@injust
Copy link
Contributor Author

injust commented Sep 15, 2024

I'm sharing the project settings as part of the project repo, not the global settings. Can I partially override global settings, such as the directories in detect_env? Because in that case it would be easier to leave the activation_script out of the project settings, and only override the directories part.

Oh, I see. I didn't think about that use case at all.

You should probably open a separate issue for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
setting Feedback for preferences, configuration, etc support User support (non-defect troubleshooting, documentation, etc)
Projects
None yet
Development

No branches or pull requests

3 participants