Skip to content

add blink cmp highlight groups #96

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

boydkelly
Copy link
Contributor

Blink seems to be fast taking over nvim-cmp as the defacto completion package. The cmdline functionality is very new and there seem to be few missing pieces that might require some adjustements later (ie Match and MachFuzzy for one). Without the new highlight groups blink will use either new lor legacy groups. The new groups look ok but are black and white. The legacy groups come up very bad looking. Also blink at least for now seems to be using the kind.property icon in the cmdline menu which seems different. I have therefore changed the color of only that icon in order to respect the cmdline.

Screenshots shown of completion with blink and these highlight groups.

Screenshot From 2025-01-21 13-11-14
Screenshot From 2025-01-21 13-10-26

@jakmaz
Copy link

jakmaz commented Apr 24, 2025

this looks really nice, looking forward for it to be merged!

@ethanuppal
Copy link

Also hyped

@xStormyy
Copy link

xStormyy commented May 1, 2025

Thank you for the PR!

I would personally change one thing though, and that is the background's and border's color of the documentation (which are the popups for the code snippets in the screenshots) to be the same color as in the existing cmp highlights, which is base00.

@boydkelly
Copy link
Contributor Author

boydkelly commented May 1, 2025

i had just let blink do its thing for some of the default settings where these linked to existing oxocarbon settings. I can see that there are defaults for the documentation window that point ot NormalFload and FloatBorder which Oxocarbon handles. Also the completion menu links to Pmenu highlight group. There don't seem to be any settings in the existing 'cmp' section that reference the menu background at all. But would they not be Pmenu and Float by default as well?

-- blink defaults here:
(custom-set-face! :BlinkCmpMenu [] {:link "Pmenu"})     <--- set in my proposal but also blink default value
(custom-set-face! :BlinkCmpDoc [] {:link "NormalFloat"})  <---- unset but blink defautl
(custom-set-face! :BlinkCmpDocBorder [] {:link "FloatBorder"})  <--unset but blink default

--  current oxocarbon values for above:
(custom-set-face! :Pmenu [] {:fg oxocarbon.base04 :bg oxocarbon.base01})
(custom-set-face! :NormalFloat [] {:fg oxocarbon.base05 :bg oxocarbon.blend})
(custom-set-face! :FloatBorder [] {:fg oxocarbon.blend :bg oxocarbon.blend})

But I don't see any refs at all by cmp to the menu background in the exisitng config. Are you suggesting to change the background of the BlinkCmpDoc and BlinkCmpDocBorder to base00?

@xStormyy
Copy link

xStormyy commented May 2, 2025

I am suggesting BlinkCmpDoc and BlinkCmpDocBorder to be base00, yeah. I think cmp's styling is just an effect of cmp doing it's own thing with styles. Regardless, I feel like staying consistent with cmp is still something we should do.

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.

4 participants