posit-dev / posit-dev/positron

Add a way to open editors in non-preview mode from the file Explorer

Open
#3,017 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: core enhancement
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:

Screenshot 2024-04-19 at 9 55 07 AM

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.