Skip to content

Conversation

@nabellows
Copy link

🎉 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 = true to get live config re-loading

@nabellows
Copy link
Author

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

image

@nabellows nabellows changed the title Pr feat(lualine): overrides for lualine integration Mar 12, 2025
@nabellows nabellows changed the title feat(lualine): overrides for lualine integration feat(lualine): color overrides for lualine integration Mar 12, 2025
@JAWS-tm

This comment was marked as spam.

Copy link
Collaborator

@comfysage comfysage left a 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
Comment on lines 1015 to 1018
```
To setup lualine to find the catppuccin theme with default integration and any overrides:
```lua
-- Setup lualine
Copy link
Collaborator

@comfysage comfysage Oct 25, 2025

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

Suggested change
```
To setup lualine to find the catppuccin theme with default integration and any overrides:
```lua
-- Setup lualine
-- in your config:

Copy link
Author

@nabellows nabellows Oct 28, 2025

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?

Copy link
Collaborator

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.

@nabellows
Copy link
Author

nabellows commented Oct 28, 2025

Thanks for the review @comfysage, some questions

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).

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:

image image

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"
Copy link
Author

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

@comfysage
Copy link
Collaborator

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.

Nathan Bellows and others added 2 commits October 28, 2025 19:33
@nabellows nabellows requested a review from comfysage October 29, 2025 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants