microsoft / microsoft/PowerToys

Monaco Preview change to allow larger files to be previewed

Open
#48,926 0 comments 0 reactions 0 assignees View on GitHub
Needs-Triage Product-File Explorer
Dominant language
C
Stars
139k
Forks
8.6k
PR merge metrics
PR metrics pending

Description

### Description of the new feature / enhancement

As of 0.100.2

Allow larger files to be previewed above 100Kbytes. I am not saying we always need to see more than 100Kbytes at one time, but at least being able to set the limit higher and see the first 500KB or maybe scroll through the file using a 100KB sliding window at a time in the preview, or something more flexible would be quite useful.

If not then a way to select specifically which extensions within the groups and opt out of those that are not a good fit for this tool while leaving the others that work well.

Thanks to everyone who contributes to these tools. :-)

### Scenario when this would be used?

Being able to look at the first 100KB or scroll to some window range of the file or the last 100KB is far better than just an error/fault message. This is especially true for log files. I could switch the file association but the Monaco previewer seems to override them.

If they could individually by extension be disabled withing the group of Source Code Files, Markdown files, etc... The .TXT file extension is one where the builtin previewer does not have the same limitation, but Monaco as a group is all or nothing.

### Supporting information

Older request:
https://github.com/microsoft/PowerToys/issues/19578

There was a request a while ago that was partially fulfilled by adding a feature that allows bumping it to 100KB. Seems like a little bit more flexibility might be valuable.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the Monaco Preview implementation and the earlier request in issue #19578 to understand the existing 100 KB limit and file-association behavior. Done means the project has an agreed, implemented way to preview larger files or select which extensions Monaco handles, with the chosen behavior documented and verified.

Written by the indexing model from the issue text.

Assessment

Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.