samuelmeuli/glance

Add support for *.[extension].dist

baumerdev opened this issue · 2 comments

Sometimes local config files aren't added to Git repositories but general config files with the original filename and an additional .dist extension.

For example:
phpunit.xml.dist
grumphp.yml.dist

Since those files have the .dist extension, Glance won't show any preview. Even if the "real" extension is known and can be handled by Glance.

This seems like a weird naming convention to me. Why not *.dist.yml? Many tools rely on a file's extension to determine its type, and this way the information is basically lost. I've tried opening such .dist files in VSCode and IntelliJ; neither of them recognize the actual file type correctly.

I see there are some popular frameworks using this convention, though. Maybe I'll add the UTI for .dist so Glance shows the file content, but I'd rather not complicate the syntax highlighting code to support such files.

Implemented in #33.