Okay, so I just discovered this. I don’t know how long its been in here or if this works in ST2 (at least sidebar icons won’t), but let me lay this out for people.
Lets say you have a tmLanguage file: MyAwesome.tmLanguage file.
Now I have known about tmLanguage settings files, but what I didn’t realize is that you can append to the recognized extensions of the XML in it. You can create a settings file MyAwesome.sublime-settings in your user folder add new extensions that will cause sublime to automatically open that file with the correct syntax and use the associated icon for that syntax in the sidebar:
For example. I have a makefile that uses the extension .mak, but sublime doesn’t recognize the extension as a makefile, so I create Makefile.sublime-settings in my User folder and add this:
{
"extensions": "mak"]
}
Now sublime recognizes mak as a make file, and now applies the appropriate sidebar icon!
This is something I will be implementing in ApplySyntax moving forward. I think adding an extension option in ApplySyntax that creates these files for us will allow us to append new extensions and get their icons showing up correct.