posit-dev / posit-dev/positron
Add a way to open editors in non-preview mode from the file Explorer
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 195
Description
Related to https://github.com/posit-dev/positron/issues/3016
While we want to turn preview editors back on in general (in particular for git and debug files), we do think that it can be confusing that files opened from the file explorer open in preview mode (because clicking the file seems like an explicit gesture of declaring it to be open). So one idea Hadley had was to provide an option to allow files opened from the explorer to be opened as "permanent" editors rather than preview ones.
There is some existing art for this for files opened from quick open and code nav, so it would be an extension of that idea:
We think the place to utilize this option is here:
https://github.com/posit-dev/positron/blob/25dfb006f98a598b77dd426d155626d507cb1f10/src/vs/workbench/contrib/files/browser/views/explorerView.ts#L527
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/vs/workbench/contrib/files/browser/views/explorerView.ts around line 527, then inspect how quick open and code navigation open permanent editors. Add an explorer option that makes files opened there permanent rather than preview editors. Done means the option is available in the indicated Explorer location and changes the editor-opening behavior as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- desktop, developer-experience
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100