Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
languages: Support terminal auto-activation for `poetry` managed Python environment (#46900)
Xin Zhaoe1f73a61fe04
diff --git a/crates/languages/src/python.rs b/crates/languages/src/python.rsindex 81a9971b274..8195ea554b5 100644--- a/crates/languages/src/python.rs+++ b/crates/languages/src/python.rs@@ -1362,7 +1362,8 @@ impl ToolchainLister for PythonToolchainProvider {PythonEnvironmentKind::Venv| PythonEnvironmentKind::VirtualEnv| PythonEnvironmentKind::Uv- | PythonEnvironmentKind::UvWorkspace,+ | PythonEnvironmentKind::UvWorkspace+ | PythonEnvironmentKind::Poetry,) => {if let Some(activation_scripts) = &toolchain.activation_scripts {if let Some(activate_script_path) = activation_scripts.get(&shell) {@@ -1424,7 +1425,8 @@ async fn venv_to_toolchain(venv: PythonEnvironment, fs: &dyn Fs) -> Option<ToolcPythonEnvironmentKind::Venv| PythonEnvironmentKind::VirtualEnv| PythonEnvironmentKind::Uv- | PythonEnvironmentKind::UvWorkspace,+ | PythonEnvironmentKind::UvWorkspace+ | PythonEnvironmentKind::Poetry,) => resolve_venv_activation_scripts(&venv, fs, &mut activation_scripts).await,_ => {}}