toolchain: Respect currently focused file when querying toolchains (#28875)
Closes #21743 https://github.com/user-attachments/assets/0230f233-58a4-494c-90af-28ce82f9fc1d Release Notes: - Virtual environment picker now looks up virtual environment based on parent directory of active file; this enables having multiple active virtual environments in a single worktree.
This commit is contained in:
@@ -3094,6 +3094,9 @@ impl Project {
|
||||
.map(|lister| lister.term())
|
||||
}
|
||||
|
||||
pub fn toolchain_store(&self) -> Option<Entity<ToolchainStore>> {
|
||||
self.toolchain_store.clone()
|
||||
}
|
||||
pub fn activate_toolchain(
|
||||
&self,
|
||||
path: ProjectPath,
|
||||
|
||||
@@ -55,6 +55,7 @@ impl ToolchainStore {
|
||||
});
|
||||
Self(ToolchainStoreInner::Local(entity, subscription))
|
||||
}
|
||||
|
||||
pub(super) fn remote(project_id: u64, client: AnyProtoClient, cx: &mut App) -> Self {
|
||||
Self(ToolchainStoreInner::Remote(
|
||||
cx.new(|_| RemoteToolchainStore { client, project_id }),
|
||||
@@ -285,7 +286,7 @@ struct LocalStore(WeakEntity<LocalToolchainStore>);
|
||||
struct RemoteStore(WeakEntity<RemoteToolchainStore>);
|
||||
|
||||
#[derive(Clone)]
|
||||
pub(crate) enum ToolchainStoreEvent {
|
||||
pub enum ToolchainStoreEvent {
|
||||
ToolchainActivated,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user