microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
109.68k stars 6.46k forks source link

File Explorer - Preview Pane - Add support for custom file extensions #22279

Open Ares9323 opened 1 year ago

Ares9323 commented 1 year ago

Description of the new feature / enhancement

I'd like to introduce the possibility to add custom file extension to this list: image

PowerShell files (.ps1) and Linux Shell filer (.sh) are supported by this tool, but their extension is not present in this list, it would be useful to see every working extension: (A list is not even available in the Documentation) image

image

Batch files (.bat) have the default windows preview (white background with black text) and I'd like to be able to change it to the default Monaco style. image

Git files, like .gitignore and .gitattributes, have their preview if you have git installed (also black on white, and I'd like to override this too) image

This also applies to other formats I often would like to read without opening them, like:

It would be really useful to have the possibility to add custom extensions and treat them as regular .txt files (I don't really care about having fancy colors, but that would be a plus)

Scenario when this would be used?

To preview files with custom extensions that could be easily supported "out of the box" but they are not recognized by the tool

Supporting information

In my specific case, as an Unreal Engine dev, it would be really useful to preview project and plugin files, that have the following syntax:

.uproject file:

{
    "FileVersion": 3,
    "EngineAssociation": "{F606ED38-477B-4BEB-D8C5-D588318C83C6}",
    "Category": "",
    "Description": "",
    "Modules": [
        {
            "Name": "UnrealProject",
            "Type": "Runtime",
            "LoadingPhase": "Default",
            "AdditionalDependencies": [
                "Engine",
                "CoreUObject"
            ]
        }
    ]
}

.uplugin file:

{
    "FileVersion": 3,
    "Version": 1,
    "VersionName": "1.0",
    "Description": "Mongocxx Library",
    "Category": "Database",
    "CreatedBy": "Ares9323",
    "CreatedByURL": "",
    "MarketplaceURL": "",
    "SupportURL": "",
    "EngineVersion": "4.27.0",
    "CanContainContent": false,
    "Installed": true,
    "Modules": [
        {
            "Name": "MongoDB",
            "Type": "Runtime",
            "LoadingPhase": "EarliestPossible",
            "PlatformAllowList": [
                "Win64"
            ],
            "WhitelistPlatforms" :
            [
                "Win32",
                "Win64"
            ]
        }
    ]
}
mdodge-ecgrow commented 1 year ago

I would also love to see a text preview of files with no extension.