w4 / bin

:wastebasket: a paste bin.
Other
420 stars 44 forks source link

[Feature Request] Customization #54

Open Br31zh opened 1 year ago

Br31zh commented 1 year ago

Hello,

Do you think it would be possible to offer customization of the syntax highlighting theme in a fairly simple way?

Or at least, is it possible to tell me how I can change it before compiling? I'm having a hard time understanding at what level it's set (I don't think just changing s.get_theme("OneHalfDark") to s.get_theme("base16-eighties") will be enough? Apparently syntect supports base16 themes, but I don't understand how it all works).

EDIT: I tried to just change the theme name, it didn’t work, as expected.

Thanks.

evogelsa commented 4 months ago

It looks like the built in themes for bat can be found here: https://github.com/sharkdp/bat/tree/master/assets/themes. I think if you use the name of one of the .tmTheme files in that directory or one of its submodules, that would be supported.

So for example s.get_theme("Solarized (dark)") should work.