Skip to content

"Current File" option in the project picker #1395

@eleanorjboyd

Description

@eleanorjboyd

The problem: When you click the status bar and any projects exist, pickProjectMany() shows only registered projects — no escape hatch. Per-file environment selection is completely lost.

The fix — add a special "Current File" item to the project picker:

When the user clicks the status bar, and the active editor has a Python file open, inject a separator + two extra items at the top of the pickProjectMany quick pick:

"$(file) Set for current file" — Selects an environment scoped to just the active file's URI. This is the old default behavior. It skips project selection entirely and goes straight to the environment picker, passing the file URI.

"$(add) Add current file as project..." — Creates a new project rooted at the file's parent directory (using the existing addPythonProjectCommand with quickCreate), then immediately opens the environment picker for that new project. This promotes the file into the project system in one click.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions