Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to add custom styles #46

Open
paradox460 opened this issue Oct 22, 2012 · 3 comments
Open

No way to add custom styles #46

paradox460 opened this issue Oct 22, 2012 · 3 comments

Comments

@paradox460
Copy link

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

@nathany
Copy link

nathany commented Dec 16, 2012

Is there a way to utilize Pygments plugins? http://pygments.org/docs/plugins/

@mojavelinux
Copy link
Contributor

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.

@mojavelinux
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants