Closed rktjmp closed 2 years ago
Probably:
lush-template
still ships with lush-loading theme.vim
.:Lush export|print|out|save|freeze <fname>
will:
theme.vim
in-between some markerstheme.vim
(probably just put the lush stuff inside the markers)theme-lua|lush|live.vim
(or copy the existing file at step 1)This fixes a long standing pet-peev of mine where end user lush-themes generally require a runtime dependency (lush).
This may expand to a "lush transformers" set of functions, which savq has mentioned before. Probably external to the main repo (expected use by devs only), where it would provide say "lush-alacritty.lua" that takes a table and produces at least a buffer if not a file that can be used to theme alacritty.
This implies additional files that either run the exporter completely or at least define variables.
I just built out a very simple template building structure to zenbones. Example template: https://github.com/mcchrish/zenbones.nvim/blob/main/lua/zenbones/build/alacritty.lua Build script: https://github.com/mcchrish/zenbones.nvim/blob/main/lua/zenbones/build.lua
I copied a lot of ideas from melange and tokyonight.
The build script is just a wrapper of this simple string interpolation solution http://lua-users.org/wiki/StringInterpolation then write it out to the specified file path.
I got the luxury of having just a light theme so the implementation is quite simple.
"I got the luxury of having just a light theme so the implementation is quite simple." he says before creating 30 variants :smile:
Closing in favour #78 #77
"I got the luxury of having just a light theme so the implementation is quite simple." he says before creating 30 variants 😄
Lua and lush are just too good. I can't stop writing more code. 😂
mcchrish/zenbones.nvim ships with
colors/zenbones.vim
which contains an exported lush theme andcolors/zenbones-lua.vim
for the lush loaded theme.This seems.... really obvious....
Exporting a theme could (will) impact existing theme files though, and it would make developing themes a bit awkward (
colorsheme my-theme-lua
), but it should probably be a function (auto export) and maybe some affordances made in the template repo for this.The export could place some in-file markers and only replace inside them, which might let it be a bit more opt in and less violent.
Probably:
lush-template
still ships with lush-loadingtheme.vim
.:Lush export|print|out|save|freeze <fname>
will:theme.vim
in-between some markerstheme.vim
(probably just put the lush stuff inside the markers)theme-lua|lush|live.vim
(or copy the existing file at step 1)This fixes a long standing pet-peev of mine where end user lush-themes generally require a runtime dependency (lush).
Painpoints: