Skip to content
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

feat(blink-cmp): improve styling support #809

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lua/catppuccin/groups/integrations/blink_cmp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ function M.get()
return {
BlinkCmpLabel = { fg = C.overlay2 },
BlinkCmpLabelDeprecated = { fg = C.overlay0, style = { "strikethrough" } },
BlinkCmpKind = { fg = C.blue },
BlinkCmpMenu = { fg = C.text },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was looking at the screenshots and found that the background has been reset, and I think it is this line that changed the background. You probably need to explicitly declare the background color in this case.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what exactly you mean by "the background has been reset", the current blink.cmp integration doesn't set the background color of the completion menu(the screenshot at the top), what I did was change the background of the menu to be reflective of the catppuccin colors.

The appearance of the menu(with the catppuccin background) is the exact same ui that's in place for nvim-cmp

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default, according to this line in blink.cmp, the BlinkCmpMenu is set to be the same as Pmenu, which has a background color of darkened surface0 according to this line. After defining the BlinkCmpMenu manually without setting the background color, the background becomes base, which doesn't look good when using the un-bordered UI.

BlinkCmpMenuBorder = { fg = C.blue },
BlinkCmpDocBorder = { fg = C.blue },
BlinkCmpSignatureHelpActiveParameter = { fg = C.mauve },
BlinkCmpSignatureHelpBorder = { fg = C.blue },

BlinkCmpLabelMatch = { fg = C.text, style = { "bold" } },
BlinkCmpKindText = { fg = C.green },
Expand Down