-
Notifications
You must be signed in to change notification settings - Fork 1.3k
add chameleon plugin #2176
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
base: nvim-auto-change-colors
Are you sure you want to change the base?
add chameleon plugin #2176
Conversation
How does this work together with the new theme loader we added? What I'd love to see is that the default themes use neovim.lua, but extra themes, if they don't have neovim.lua, could add neovim.theme, which would use this. And then, finally, if neither are there, we just default to pixel, which grabs colors from terminal. |
Chameleon only responds to themes that have a neovim.lua with a palette specified like below. It will ignore anything else (silently): return {
-- BACKGROUND LAYERS (dark → lighter).
bg1 = "#0F0F19",
bg2 = "#181824",
bg3 = "#202034",
-- FOREGROUND LAYERS (bright → muted).
fg1 = "#EDEDFE",
fg2 = "#BDBDE6",
fg3 = "#8C8CB8",
-- SELECTION
selbg = "#2B2B44",
selfg = "#EDEDFE",
-- COMMENTS
comment = "#7575A3",
-- ACCENT COLORS (syntax + UI)
color1 = "#FF3366",
color2 = "#00F59B",
color3 = "#FFEA00",
color4 = "#33A1FF",
color5 = "#FF66F6",
color6 = "#3CFFED",
-- UI / DECORATIVE
uic1 = "#5A5A88",
} The only issue is that Lazyvim is gonna look at the theme.lua symlink, and expects a theme so throws an error when seeing something like above. Still works, but the error comes and goes. Maybe there is a way to silence that Lazyvim error/notification? |
I think we should use a different name for these, so we can reserve neovim.lua for the case where you're referencing a full theme plugin. So chameleon should only kick in if there's no neovim.lua, but if we have a neovim.theme, or something like that. |
Done! chameleon now responds to |
Do you have some themes that I can use to test this on? |
Also, @ryanrhughes, does this mean we have to add the chameleon plugin in the omarchy-lazyvim bundle? I've already wanted to have a copy of all the default theme plugins in that bundle so they're preloaded there. |
@dhh Yep. We would need that. In thinking about this more; we need to consider how we want to maintain this so that we pick up additions like this. We either have to clone Omarchy in and pull those config files over during the build process or just move our Nvim configs over to that package instead. I think I prefer the latter since it's a little cleaner and just creates a single, self-contained module. I'll mess with this tomorrow and see if there are any unforeseen consequences. |
Adds the chameleon plugin to support easy neovim theming using a color palette.
See chameleon.nvim for more info.