Skip to content

Add Zenburn theme#1659

Merged
Anteru merged 5 commits intopygments:masterfrom
sirex:zenburn
Feb 7, 2021
Merged

Add Zenburn theme#1659
Anteru merged 5 commits intopygments:masterfrom
sirex:zenburn

Conversation

@sirex
Copy link
Copy Markdown
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

@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

3 participants