Recognize More Multimedia Filetypes (#7557)

This PR recognizes the following filetypes and provides them with
appropriate icons: `.avi .heic .j2k .jfif .jp2 .jxl .m4a .m4v .mkv .mka
.mov .opus .qoi .wma .wmv .wv`.

It also corrects `.ogg` to display an audio icon, not a video icon.
Though the container supports video, `.ogg` files are most commonly
found containing audio-only bitstreams likely due to the popularity of
the Vorbis audio codec. VSCode recognizes OGG files as audio.

Here is an exhaustive list of the file formats this PR aims to
recognize, with a subjective commonality rating attached to each:

- `.avi`: Audio Video Interleave. Multimedia container format for video
and audio data. **Rating: 7/10**
- `.heic`: High Efficiency Image Format. The same thing as `.heif`,
which is currently recognized. **Rating: 6/10**
- `.j2k`: JPEG 2000. Bitmap image format for lossy or lossless
compression. **Rating: 3/10**
- `.jfif`: JPEG File Interchange Format. Alternative JPEG extension that
sometimes pops up on the Web. **Rating: 5/10**
- `.jp2`: JPEG 2000 again, same rating.
- `.jxl`: JPEG XL. Modern, versatile image format growing in popularity.
**Rating: 5/10**
- `.m4a`: MPEG-4 Audio. Audio file format using AAC (lossy) or ALAC
(lossless) codecs. **Rating: 8/10**
- `.m4v`: MPEG-4 Video. Video container format developed by Apple
similar to MP4. **Rating: 4/10**
- `.mkv`: Matroska Video. Multimedia container format for video, audio,
and subtitle tracks. **Rating: 8/10**
- `.mka`: Matroska Audio. Audio file format supporting several types of
audio compression algorithms. **Rating: 3/10**
- `.mov`: QuickTime Movie. Multimedia container format developed by
Apple. **Rating: 8/10**
- `.opus`: Opus Audio. Audio coding format for efficient real-time audio
streaming. **Rating: 7/10**
- `.qoi`: Quite OK Image. Modern lossless image format for fast encoding
& decoding. **Rating: 1/10**
- `.wma`: Windows Media Audio. Audio file format developed by Microsoft.
**Rating: 6/10**
- `.wmv`: Windows Media Video. Video file format developed by Microsoft.
**Rating: 7/10**
- `.wv`: WavPack. Free, open-source lossless audio compression format
similar to FLAC. **Rating: 2/10**

Again note that the commonality rating is subjective and may vary based
on the specific use cases users have for Zed and their software
environments. I hope some of these will be considered, as having
flexible filetype recognition greatly adds to the feeling of
completeness in an editor at what appears to be very little cost. Thank
you!

Release Notes:

- Adds icon associations for more multimedia types [#7551](https://github.com/zed-industries/zed/issues/7551).
This commit is contained in:
Gianni Rosato 2024-02-08 04:25:54 -05:00 committed by GitHub
parent 61b8d3639f
commit 73498f388a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,6 +4,7 @@
"aac": "audio",
"accdb": "storage",
"app.src": "erlang",
"avi": "video",
"avif": "image",
"bak": "backup",
"bash": "terminal",
@ -50,6 +51,7 @@
"hbs": "template",
"heex": "elixir",
"heif": "image",
"heic": "image",
"hrl": "erlang",
"hs": "haskell",
"htm": "template",
@ -57,21 +59,30 @@
"ib": "storage",
"ico": "image",
"ini": "settings",
"j2k": "image",
"java": "code",
"jfif": "image",
"jp2": "image",
"jpeg": "image",
"jpg": "image",
"js": "code",
"json": "storage",
"jsonc": "storage",
"jxl": "image",
"ldf": "storage",
"lock": "lock",
"log": "log",
"m4a": "audio",
"m4v": "video",
"md": "document",
"mdb": "storage",
"mdf": "storage",
"mdx": "document",
"mkv": "video",
"mka": "audio",
"ml": "ocaml",
"mli": "ocaml",
"mov": "video",
"mp3": "audio",
"mp4": "video",
"myd": "storage",
@ -79,7 +90,8 @@
"odp": "document",
"ods": "document",
"odt": "document",
"ogg": "video",
"ogg": "audio",
"opus": "audio",
"pdb": "storage",
"pdf": "document",
"php": "php",
@ -93,6 +105,7 @@
"ps1": "terminal",
"psd": "image",
"py": "python",
"qoi": "image",
"rb": "ruby",
"rebar.config": "erlang",
"rkt": "code",
@ -116,6 +129,9 @@
"wav": "audio",
"webm": "video",
"webp": "image",
"wma": "audio",
"wmv": "video",
"wv": "audio",
"xls": "document",
"xlsx": "document",
"xml": "template",