vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Ability to associate esoteric extensions with existing file types

Open martinbean opened this issue 11 months ago • 5 comments

It would be nice if there was an ability to “map” extensions with an existing file type, similarly the way you can map extensions to a language using the files.associations configuration option.

For example, I like to do some retro programming of PlayStation 1 games. The PlayStation 1 had its own native file formats, such as:

  • STR for streaming data (videos)
  • TIM for textured images
  • VB/VH for audio samples

Given these are highly specific, they just show a default “text file” icon in the Explorer. It would nice if we could get a configuration option to indicate what type of files they are, though. Something like:

"files.types": {
    "str": "video",
    "tim": "image",
    "vb": "audio",
    "vh": "audio"
}

I did look into this, but it seems the current way to address this is to create a custom extension. This seems impractical, due to:

  • The huge barrier to creating an extension in the first place.
  • It’s only a small number of file extensions I’m interested in.
  • I have to bundle an existing file icon theme’s icons into my extension, which is inefficient for less than half a dozen file types.

I’m not asking for these file types to be supported by the Visual Studio Code editor, but just think it would be a nice quality of life improvement to be able to tell Code what type of files they are so they get an appropriate icon. For example, the Explorer shows a speaker icon for *.mp3 files and a play icon for *.mp4 files in the Explorer, despite Code not being able to open and play MP3 and MP4 files out of the box.

martinbean avatar Jan 27 '25 12:01 martinbean

Maybe using https://github.com/vscode-icons/vscode-icons.

Something like

"vsicons.associations.files": [
        { "icon": "js", "extensions": ["jsx"], "format": "svg", "overrides": "reactjs" }
    ],

See https://github.com/vscode-icons/vscode-icons/issues/1363

albertosantini avatar Jan 27 '25 13:01 albertosantini

@albertosantini I don’t really want to install an entirely new icon theme (and extension), which defines its own icons. I did try that package and it replaces the Seti icon theme entirely.

I feel it should be possible to just say, “this file is an X-type file” so that any theme icon can set the appropriate icon. So it would be nice just to configure that files with a *.tim extension should be treated as a *.bmp file, and receive the same icon a *.bmp file would receive (regardless of configured icon theme), similarly to how we can associate file extensions with a language, and then the editor (and extensions) will work with that file as if it were that language.

martinbean avatar Jan 31 '25 15:01 martinbean

Yes, your mileage may vary.

I meant finally you may hack the theme (new or stock) like a fast workaround, instead of waiting for a change request landing in the box.

albertosantini avatar Jan 31 '25 16:01 albertosantini

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

:slightly_frowning_face: In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

Happy Coding!