Continuing the discussion from File Type Icons package:
Actually, there is one thing that I don’t like about my package. There is a lot of knowledge of file masks and such encoded in the
GrammarRegistry about how to determine what type a file is from file masks to parsing the contents of the file itself. But I’ve poorly duplicated only some of that by having a bunch of rules in my CSS to determine the file type from the path or the file mask. It would be great if in all the places that file names are displayed, in addition to the
data-path attributes that are placed in the HTML if a
data-file-scope could be added. Something like this:
<span class="name icon icon-file-text" data-name="package.json" data-path="package.json" data-file-scope="source.json"> </span>
I’m looking into how to add this as a PR for the Tree View, Tabs and Fuzzy Finder packages … but I’d appreciate any ideas that people have.