-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Improve changing palette and extended palette #121
Comments
Questions:
So I will start implmenting: -- This callback can be used to override the colors used in the palette.
on_palette = function(palette) return palette end,
-- This callback can be used to override highlights before they are applied.
on_highlight = function(highlights, palette) return highlights end, |
I think I am going to have to think on this one for a few days.
What about using more highlight linking? So make a highlight group for |
This is my best idea so far: 26f9c4a |
I think this is the best solution changing_palette using the base palette works the same as normal, and you can set values in the extended palette just as you would the base palette. You can even use values in the extended palette but they will be nil for the fist call: #100 can be solved with 3 lines: on_palette = function(palette)
-- the if is needed because on_palette is called twice and one time palette.bg is nil which breaks blend
if palette.bg ~= nil then
palette.bg_visual = require("nordic.utils").blend(palette.orange.base, palette.bg, 0.15)
end
return palette
end,
I am not sure about I will re add support for override + add a deprecated warning on launch... then I will open a PR. |
We need a better way to reliably override the palette and extended palette.
We should take inspiration from how tokyonight does it:
https://github.com/folke/tokyonight.nvim/blob/fbe3a27378fdd51a8ddd04f57012455436916a62/lua/tokyonight/theme.lua#L873
https://github.com/folke/tokyonight.nvim/blob/fbe3a27378fdd51a8ddd04f57012455436916a62/lua/tokyonight/colors.lua#L158
The text was updated successfully, but these errors were encountered: