Read from `.sublime-syntax`'s `hidden_file_extensions`
Would it be possible for bat to read from the hidden_file_extensions property of .sublime-syntax files in addition to the file_extension property? For some projects, file types are have a different extension than usual, such as XML in C# and VB.NET projects (.csproj and .vbproj are written in XML syntax). These less common extensions seem to be already listed in some .sublime-syntax files, but are not currently being read by bat (example).
Expected behavior: Syntax highlighting of files such as .csproj
Current behavior: No syntax highlighting
Support for hidden_file_extensions was added to syntect 5.0.0 (https://github.com/trishume/syntect/pull/419) so this should be pretty straightforward to do. Tentatively setting as good-first-issue.
@Enselic Could you provide some more details? Which pieces of the code would be involved in this? I'd like to work on my first rust contribution 😺
Hmm, after thinking some more about it, I actually expected it to already work. But the syntect implementation looks incomplete. bat relies on the following code, but I think it should be changed to also take hidden_file_extensions into account:
https://github.com/trishume/syntect/blob/606450becf047721b1411da7b1ddd782e6c25d3d/src/parsing/syntax_set.rs#L185-L187
Maybe you can make your first rust contribution towards syntect rather than bat? :angel: