cideM / yui

A minimal Vim/Neovim color scheme inspired by Dieter Rams
MIT License
135 stars 7 forks source link

Completely overhaul the theme system #65

Closed cideM closed 2 months ago

cideM commented 3 months ago

This is the kind of commit you don't want, since it includes way too many changes at the same time. But the changes are, in my opinion, too good not to have them and splitting things up into individual chunks is too much work.

This commit reintroduces a DSL that allows to construct themes by refering to, and adjusting, colors from other themes (in the same repo). Meaning the Alacritty theme mostly just refers to colors from the Neovim theme. But not just colors in the sense of red and blue but in the sense of Normal.guifg or StatusLine.guibg.

The difference to the last DSL attempt is that this is far smaller and more principled. Instead of creating abstractions for Vimscript for things like if/else the DSL only deals with color related code.

In the end, the DSL values are still used for string templating, which ties the theme DSL to Vimscript. If/else (and whatever else you want to do in Vimscript) is done in the resulting template string -- meaning it's still Vimscript.

Please also see ARCHITECTURE.md for an explanation of how it works.