-
-
Notifications
You must be signed in to change notification settings - Fork 272
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
base: main
Are you sure you want to change the base?
Conversation
add hl groups for BlinkCmpKind, BlinkCmpMenu, BlinkCmpMenuBorder, BlinkCmpDocBorder, BlinkCmpSignatureHelpActiveParameter
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 |
@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 }, |
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 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.
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 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
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.
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.
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.
This is how it looks after the new hl group additions:
All styling colors were taken from previous nvim-cmp styling and the catppuccin vscode theme.