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

Add Zenburn theme #1659

Merged
merged 5 commits into from
Feb 7, 2021
Merged

Add Zenburn theme #1659

merged 5 commits into from
Feb 7, 2021

Conversation

sirex
Copy link
Contributor

@sirex sirex commented Jan 3, 2021

Zenburn theme home page: https://kippura.org/zenburnpage/

And Vim Zenburn theme repository, from which I took color codes: https://github.com/jnurmine/Zenburn

Screenshot from 2021-01-04 01-18-15

pygments/styles/zenburn.py Show resolved Hide resolved
@Anteru Anteru self-assigned this Feb 6, 2021
@Anteru Anteru added the update needed Waiting for an update from the PR/issue creator label Feb 6, 2021
Zenburn theme home page: https://kippura.org/zenburnpage/

And Vim Zenburn theme repository, from which I took color codes: https://github.com/jnurmine/Zenburn
As requested in code review.
@sirex
Copy link
Contributor Author

sirex commented Feb 6, 2021

pygmentize -f html -O style=zenburn,full,linenos=True,hl_lines=9 test.py -o test.html

Screenshot from 2021-02-06 21-27-52

Probably during rebase I accidentally added dracula, which is now removed.
@sirex sirex requested a review from Anteru February 6, 2021 19:42
It looks, that pygments no longer use these markers.
@Anteru
Copy link
Collaborator

Anteru commented Feb 6, 2021

Thanks! There are only two more colors missing, for special line numbers. You can test that with linenospecial=2, the color names are line_number_special_color and line_number_special_background_color. Those are used to highlight every N-th line, so you probably want something a tad brighter for them.

highlight_color = '#484848'
line_number_color = '#5d6262'
line_number_background_color = '#353535'
styles = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add colors for the _special_ variant as well.

Something does not work with HTML generator, because colors does not
show up, unless I added `noclasses=True`.
@sirex
Copy link
Contributor Author

sirex commented Feb 6, 2021

Added _spcial_ colors for line numbers. But something does not work with HTML generator, because just by adding linenospecial=2 does not work. It only worked for me by also adding noclasses=True. It seems, that generated HTML and CSS styles does not line up.

pygmentize -f html -O style=zenburn,full,linenos=True,linenospecial=2,noclasses=True,hl_lines=9 test.py -o /tmp/test.html

Screenshot from 2021-02-07 00-02-22

@sirex sirex requested a review from Anteru February 6, 2021 22:08
@paw-lu paw-lu mentioned this pull request Feb 7, 2021
@paw-lu
Copy link
Contributor

paw-lu commented Feb 7, 2021

Thanks @sirex! I was going in circles trying to figure out why the special formatting wasn't applying. Thanks for documenting your temporary solution.

@Anteru
Copy link
Collaborator

Anteru commented Feb 7, 2021

The class issue is fixed in #1701, I think. Thanks for your contribution!

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

Successfully merging this pull request may close these issues.

None yet

3 participants