Automatically enable light or dark variants based on terminal colors. #629
-
I apologize in advance if I've missed something obvious, but I haven't been able to get this to work. For context, I'm using Neovim 0.9.4 on Mac with iTerm2. I want Neovim to set my colorscheme to either catppuccin-mocha when using a dark terminal theme, or catppuccin-latte when using a light terminal theme. Based on the default options for catppuccin, this seems like it should work "out of the box," but I can't get it to work. In my init.lua, I set catppuccin as the default color scheme with Oddly enough, I don't encounter this problem with other color schemes. For example, the background color is correctly determined when using tokyonight, and the appropriate light or dark variant is enabled automatically. Does anyone know of a solution to this problem? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Have you tried to change that line to |
Beta Was this translation helpful? Give feedback.
-
u need set return {
"catppuccin/nvim",
name = "catppuccin",
priority = 1000,
config = function()
require("catppuccin").setup({
flavour = "mocha",
background = {
light = "latte",
dark = "mocha",
},
})
vim.cmd.colorscheme("catppuccin")
vim.o.background = "light"
end,
}
|
Beta Was this translation helpful? Give feedback.
-
This should get fixed in the latest commit Refer to #682 for more infos |
Beta Was this translation helpful? Give feedback.
This should get fixed in the latest commit
Refer to #682 for more infos