I'm using Vim 8.2 with rust highlighter and YCM plugin for auto-completion and signature help.

Everything works except method signature:

enter image description here

It has same color for both color text and bg in parts like self in (&mut self, other ....

I have already seen this but was not helpful. Can anyone help?

  • @BLayer Highlights only appear in Insert mode, once I go to Normal mode to run any command, it disappears. +tried colorscheme route, no luck.
    – d9ngle
    Aug 4 at 10:20
  • 1
    Depending on what is used, changing the highlight for Popup (or PopupMenu or Sel or whatever it is) might help. You could also take a look at the plugin to see if you can figure out how it does the highlights. (That looks like a fairly default vim colorscheme, and the completion menu does have an ugly pink color in the default…)
    – D. Ben Knoble
    Aug 4 at 18:33
  • 2
    FYI, by default popups use PMenu/PMenuSel for text coloring unless Popup/PopupSelected are defined in which case those are used. (If memory serves me correctly.) The screenshot doesn't appear to be showing the godawful default "magenta", though (unless the hue settings are way out of whack.) :)
    – B Layer
    Aug 4 at 19:23
  • 1
    @D.BenKnoble A gift: if execute("hi Pmenu") =~? 'guibg=\a*magenta' | hi Pmenu guibg=black | endif (Works well in a Colorscheme autocmd.) :D
    – B Layer
    Aug 4 at 19:52
  • 1
    Glad you found a solution. FYI guibg is only relevant in GUI Vim OR terminal Vim when 24-bit color is configured (:h 'termguicolors')
    – B Layer
    Aug 5 at 11:49

On my setup, Pmenu is responsible for the popup (see BLayer's comment) so:

:hi Pmenu ctermbg=darkgray

or add it to your vimrc, below all other styling rules:

highlight Pmenu ctermbg=darkgray

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.