feat(lualine): color overrides for lualine integration
🎉 First off, thanks for taking the time to contribute! 🎉
Here are some guidelines:
- Format code using stylua.
- New plugin integration should be added in alphabetical order:
- Create a topic branch on your fork for your specific PR.
- Use conventionalcommits.org's rules for explicit and meaningful commit messages.
- If it's your first time contributing to a project, then read About pull requests on Github's docs.
Here are some tips:
- Use
vim.g.catppuccin_debug = trueto get live config re-loading
I use this in my personal config to make the lualine colors match the usual Catppuccin theme with Lavender as Normal mode highlight for example. Addresses: https://github.com/catppuccin/nvim/issues/635
What is the status of this PR ?
Thanks for the review @comfysage, some questions
remove the
O.integrations.lualine.allfield; there's almost no situation where this is useful and this causes type errors (sinceallis not a valid flavor).
From my fork and as far as I see still in main, there is an all variant in the CtpFlavors type: https://github.com/catppuccin/nvim/blob/main/lua/catppuccin/types.lua#L7. Similar support exists on O.highlight_overrides and is documented accordingly. Similarly I don't see type errors on my side with lua LSP.
Can you explain this more? I'd be sad to see this go as this is actually my primary/only use case as per my config being as below. It lets me use "lavender" color for both my light/dark schemes (latte vs macchiatto), or whatever flavor I feel like for the day:
lualine = {
all = function(colors)
---@type CtpIntegrationLualineOverride
return {
normal = {
a = { bg = colors.lavender },
b = { fg = colors.lavender },
},
insert = {
a = { bg = colors.flamingo },
b = { fg = colors.flamingo },
},
}
end,
},
Adding to this, with typical LuaLS + blink + lazydev setup, we can see my type hinting is working happily, even within all:
The other question I left inline to your suggestion is how we want to handle documenting the "config here in catppuccin" ... "and then config in your lualine config". That "and then" documentation was the existing/old documentation that I left in to ensure the user allows lualine to find the lualine theme provided by catppuccin.
Similar support exists on O.highlight_overrides and is documented accordingly. Similarly I don't see type errors on my side with lua LSP.
in that case it's alright:)
thnx for the lovely work <3
as I had mentioned in the review: just use a lua comment to explain it should be part of the user's lualine config.