-
-
Notifications
You must be signed in to change notification settings - Fork 312
feat(lualine): color overrides for lualine integration #843
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: main
Are you sure you want to change the base?
Conversation
|
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: #635
|
This comment was marked as spam.
This comment was marked as spam.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thnx for the pr. this seems like a useful feature.
remove the O.integrations.lualine.all field; there's almost no situation where this is useful and this causes type errors (since all is not a valid flavor).
additonally, use the requested changes.
README.md
Outdated
| ``` | ||
| To setup lualine to find the catppuccin theme with default integration and any overrides: | ||
| ```lua | ||
| -- Setup lualine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this explanation seems redundant and isnt done in other examples
| ``` | |
| To setup lualine to find the catppuccin theme with default integration and any overrides: | |
| ```lua | |
| -- Setup lualine | |
| -- in your config: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unsure on this one as I don't see other examples with a similar mention of both the arguments to require"catppuccin".setup(... ) (integrations) and then the require"the-plugin".setup(...) being separate. I wanted to make sure they are separate code blocks as they are not going to be the same block in the user's actual config.
If we do want it to be one big lua block, I'd be more happy to append something like a lua comment -- ... And in your lualine setup: or similar.
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a code comment seems like a good solution.
minors from initial review Co-authored-by: robin <[email protected]>
|
Thanks for the review @comfysage, some questions
From my fork and as far as I see still in main, there is an 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
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. |
| -- Setup lualine | ||
| require('lualine').setup { | ||
| options = { | ||
| -- lualine will integrate with catppuccin by name or automatically via `vim.g.colors_name` by setting this to "auto" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given this fact that I added to documentation, perhaps the "auto" which lualine provides by default is enough to just omit the instructions and let user follow lualine's options for configuration. But it was helpful that we provide extra help to new catppuccin+lualine user here
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. |
As per suggestions in code review



🎉 First off, thanks for taking the time to contribute! 🎉
Here are some guidelines:
rules for explicit and meaningful commit messages.
About pull requests
on Github's docs.
Here are some tips:
vim.g.catppuccin_debug = trueto get live config re-loading