Open paradox460 opened 12 years ago
Is there a way to utilize Pygments plugins? http://pygments.org/docs/plugins/
It would be nice if pygments.rb could check for a theme written to a Ruby interface first, then go to pygments if it doesn't find one.
This could allow styles from Rouge to be reused. All we need is a small adapter to convert the result into the same format that pygments.rb expects. pygments.rb doesn't even need to provide that adapter...also long as it allows the theme to be registered somehow.
Shoot, I just realized that the selection of the theme is happening down at the pygments layer. What I'm suggesting would only work for the css function, but then you could generate the CSS any way you want already.
It appears that it's possible to pass a style object to the style option. pygments.rb would need to detect the style option in a certain format (perhaps some sort of json) and convert it to the style interface so pygments can use it.
There is no way to add a custom style, without forking the code and dropping it into the pygments styles directory. This seems…irritating.
I'm not sure the best way to go about this, but some way to point to a python script in the filesystem that contains a style would be welcome