Open musjj opened 1 year ago
As given that syntax wont (shouldnt?) work in Lush as the g.terminal_color_1
is an invalid group name. I'm not sure there would be a compatible syntax as the term colors don't really fit into the same "group" idea and I don't want to have magic group names that automatically translate - at least not in userland.
Possibly another function could be injected, like sym
is that generates special keys internally, term_c(1) { fg = some_color }
.
This should be an already compatible way to do it though, which I think is preferable and not very burdensome?
local theme = lush(function()
return {
Normal { fg = some_color },
-- ...
}
end)
g.terminal_color_1 = theme.Normal.fg.hex -- or tostring(theme.Normal.fg) or tostring(hsl(...)) if not using a group
-- ...
return theme
https://neovim.io/doc/user/nvim_terminal_emulator.html#terminal-config Currently themes using lush.nvim have to implement a custom solution to set these variables. It would be cleaner if we can control these directly in the spec. Maybe something like:
An issue is that terminal colors aren't refreshable, so this doesn't work very well with
:Lushify
. But still, this would make applying and building colorschemes with terminal support easier. What do you think?