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

Conversation

milkias17
Copy link

add hl groups for BlinkCmpKind, BlinkCmpMenu, BlinkCmpMenuBorder, BlinkCmpDocBorder, BlinkCmpSignatureHelpActiveParameter

  • This was the previous styling for blink.cmp, it didn't have the correct background color for the completion menu, no border styling and no styling for showing the current signaturehelp item.
    Screenshot_20241210_163953

  • This is how it looks after the new hl group additions:
    image

  • All styling colors were taken from previous nvim-cmp styling and the catppuccin vscode theme.

add hl groups for BlinkCmpKind, BlinkCmpMenu, BlinkCmpMenuBorder, BlinkCmpDocBorder, BlinkCmpSignatureHelpActiveParameter
@vollowx
Copy link
Collaborator

vollowx commented Jan 30, 2025

By default we assume that the user uses the un-bordered UI and apply the colors for that, if you still want to support the bordered UI, please add a option named bordered and seperate the highlight groups.

@milkias17
Copy link
Author

@vollowx Perhaps I'm missing something, and correct me if I'm wrong here.

BlinkCmpMenuBorder highlight group only takes effect when someone enables the bordered UI, otherwise there's no difference in the UI for the user. And you said we apply the colors for that, however I'm not changing an existing highlight group, the BlinkCmpMenuBorder highlight group doesn't exist in the current blink.cmp integration.

So I'm having trouble understanding your objection, would love to be corrected if I'm missing something tho.

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

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