Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Peek] Add user-configurable support for previewing plaintext files #35516

Open
daverayment opened this issue Oct 21, 2024 · 1 comment
Open
Labels
Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams

Comments

@daverayment
Copy link
Contributor

Description of the new feature / enhancement

Note: this is based on a prior discussion on #34824 .

Peek discriminates supported files based on their file extension, and currently supports previewing a variety of plain text files, including source code files, .txt and so on.

However, this is currently a hard-coded list and cannot be edited or overridden by the user. Attempting to preview an unsupported file results in the summary information being displayed, not its contents.

This new feature would add support for previewing plaintext files, either by auto-detecting them at the time of preview (if we can find a reliable method), and/or by giving the user the ability to edit a list of text file extensions via Settings.

This would not replace the current method of editing the Monaco JSON file to add new languages or adding extensions to existing languages. It is proposed that if the same file extension were present in both the Monaco supported list and the user's setting, that the Monaco setting would take precedence; this is because the Monaco could also include support for syntax highlighting and other formatting improvements over a simple text-only preview.

Scenario when this would be used?

This would be useful because power users often want to quickly preview plaintext files from a wide variety of both popular and niche applications, and also their own filetypes with custom extensions. It is infeasible for us to support all these by adding them manually for each PowerToys release.

Supporting information

Requests for supporting new plaintext files are relatively common in the issues forum, e.g.:

#35515 - support .ion files
#34483 - support .ahk files
#33811 - support .csv files without the Office extension
etc.

The previous attempt at integrating this functionality also received supportive comments, so I believe there is demand.

@daverayment daverayment added the Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams label Oct 21, 2024
Copy link

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams
Projects
None yet
Development

No branches or pull requests

1 participant