helix-editor / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
33.96k stars 2.51k forks source link

Add xtask to generate the themes wiki page automatically #3608

Open hirschenberger opened 2 years ago

hirschenberger commented 2 years ago

It's a little bit distracting that in the themes wiki page all screenshots are of different size and show different code.

I think it would be possible to create an xtask that:

A-Walrus commented 2 years ago

Is it possible to take screenshots within a GitHub CI VM? Do they even have any graphics like Xorg / Wayland?

the-mikedavis commented 2 years ago

Instead of doing this with screenshots / images, I think it would be wise to generate HTML or maybe SVGs. tree-sitter-highlight generates HTML and might be good inspiration. The theme could then just be translated to a stylesheet. With this change, we would most likely want to host the themes previews in the docs rather than the wiki. That would have the added bonus that the theme previews would be versioned: you could see what themes are available for the current release vs the master branch.

the-mikedavis commented 2 years ago

I'm not sure if this is how https://vimcolorschemes.com/ does it, but that might be good inspiration as well.

hirschenberger commented 2 years ago

There's a crate to-html that just needs a terminal with ansi-colors and renders that to html. So we wouldn't need X and it may work in CI.