sharkdp / bat

A cat(1) clone with wings.
Apache License 2.0
49.74k stars 1.25k forks source link

Clarify supported custom theme formats #1948

Open emeinhardt opened 3 years ago

emeinhardt commented 3 years ago

The documentation for custom themes says:

This works very similar to how we add new syntax definitions.

The documentation for new syntax definitions says:

bat uses the excellent syntect library for syntax highlighting. syntect can read any Sublime Text .sublime-syntax file and theme.

To a naive reader, this might suggest that .sublime-color-scheme (+/- .sublime-theme?) files might be supported by bat, but this is not the case. From the looks of the linked issue on syntect, things have been this way since some point in 2019.

The current custom theme documentation doesn't actually say anything about what a valid format is for a custom theme. I suggest that instead the custom theme documentation explicitly indicate that the current .sublime-color-scheme format isn't supported by bat +/- give some clear indication of what formats are supported by bat.

PS After looking around at the assets folder, I was surprised (given the documentation) how many bat themes had absolutely no sublime-specific theme files at all - just .tmTheme files. I definitely don't know the context here, but it sounds like .tmThemes might actually be a more useful suggestion for custom themes than (just) referencing earlier discussion in the documentation of Sublime and .sublime-syntax?

sharkdp commented 2 years ago

Absolutely agreed. Thank you for the suggestions. Only .tmTheme files are supported currently and that should be improved in the documentation.

The documentation in the bat man page already mentions this, by the way. We should probably sync README and man page here.