# terminal: Allow configuring conda manager \(\#40577\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/9d52b6c538792217baec66bda09391b117dfd7c9)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 9d52b6c538792217baec66bda09391b117dfd7c9

Requested commit: 9d52b6c538792217baec66bda09391b117dfd7c9

Commit: 9d52b6c538792217baec66bda09391b117dfd7c9

Tree: c2362881fc74bd7fd5c46c85409cace7d7e4389b

Author: Casper van Elteren

Committer: GitHub

## Message

```
terminal: Allow configuring conda manager (#40577)

Closes #40576
This PR makes Conda activation configurable and transparent by adding a
`terminal.detect_venv.on.conda_manager` setting (`"auto" | "conda" |
"mamba" | "micromamba"`, default `"auto"`), updating Python environment
activation to honor this preference (or the detected manager executable)
and fall back to `conda` when necessary.

The preference is passed via `ZED_CONDA_MANAGER` from the terminal
settings, and the activation command is built accordingly (with proper
quoting for paths). Changes span
`zed/crates/terminal/src/terminal_settings.rs` (new `CondaManager` and
setting), `zed/crates/project/src/terminals.rs` (inject env var),
`zed/crates/languages/src/python.rs` (activation logic), and
`zed/assets/settings/default.json` (document the setting). Default
behavior remains unchanged for most users while enabling explicit
selection of `mamba` or `micromamba`.

Release Notes:
- Added: terminal.detect_venv.on.conda_manager setting to choose the
Conda manager (auto, conda, mamba, micromamba). Default: auto.
- Changed: Python Conda environment activation now respects the
configured manager, otherwise uses the detected environment manager
executable, and falls back to conda.
- Reliability: Activation commands quote manager paths to handle spaces
across platforms.
- Compatibility: No breaking changes; non-Conda environments are
unaffected; remote terminals are supported.

---------

Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
Co-authored-by: Lukas Wirth <lukas@zed.dev>
```

## Parents

- [082b80ec89748bf238f0068da80e12211fb3c7d6](https://git.cafe/gitcafe/zed/commit/082b80ec89748bf238f0068da80e12211fb3c7d6?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/9d52b6c538792217baec66bda09391b117dfd7c9?format=markdown)
