AdamRaichu / vscode-zip-viewer

An extension which allows for the manipulation of zip files in VS Code.
https://marketplace.visualstudio.com/items?itemName=AdamRaichu.zip-viewer
MIT License
10 stars 0 forks source link

feat: setting for text file association by file suffix #85

Open jcsahnwaldt opened 8 months ago

jcsahnwaldt commented 8 months ago

Is your feature request related to a problem? Please describe. It's great that I can quickly create an issue to request file type support, but it would also be great if I could change my local settings to tell Zip Viewer that files with a certain extension are text files.

Describe the solution you'd like I'd like to add something like "zipViewer.textFileAssociations": [ "*.foo" ] to my user or workspace settings to make Zip Viewer always treat these files as text files.

Describe alternatives you've considered There already is a zipViewer.textFileAssociations setting, but it doesn't seem to understand *.foo or *.zip wildcards, so I'd have to add an entry for each .foo file in each zip file, which isn't practical if I have many such files.

I don't know the internals of VS Code, but maybe there's a global file type registry that Zip Viewer could access? For example, other extensions already know that .gradle files are text files, but Zip Viewer doesn't.

AdamRaichu commented 8 months ago

Could you give an example of an extension that recognizes text files automatically? I'm aware that vscode itself checks to see if a file is a text file when you open it, but if there is some registry I am not aware of it. It makes sense that one would exist, but...

I did also search the vscode extension api docs for things like file type, type, file extension, etc. but didn't find anything like that :(.

As for a textFileAssociations-like setting for file types, I think that's a great idea! I'll take a look at that at some point, or someone else is welcome to make a pull request; it doesn't seem that difficult to implement.

AdamRaichu commented 3 months ago

@jcsahnwaldt, @dox-exon, @KingNucifera, @LiveFreeAndRoam, and @giac-fab.

I'm sorry for the delay in addressing your issues. I have been working on other projects lately, but rest assured, I have not forgotten about this one! I intend to work on these in the near future.