Search code examples
vimneovim

Why do (Neo)Vim Color Schemes not Affect Pmenu, PmenuThumb, CocInfoFloat etc.?


This has been bugging me for a while now. Why is it that I have to define colors for the floating/popup (you name it) menu by myself in (Neo)Vim, when there are all these beautiful color schemes.

I have to put a lot of time and effort into defining somewhat readable (not that pink hell) menus, which eventually might or might not match the underlying color scheme, but won't match anymore, once I decide to change the scheme.

Is there something I am missing?


Solution

  • Neovim inherits its built-in colorschemes from Vim.

    Vim's built-in colorschemes are all very old, often predating the completion menu feature, and pretty much unmaintained. They lack many things beyond the completion menu and they are generally in a bad shape.

    I started an initiative to modernise the built-in colorschemes but it will take time. If you feel like giving us a hand…

    FWIW, Pmenu and PmenuThumb are built-in highlight groups so it is legitimate to expect them to be handled by the built-in colorschemes but CocInfoFloat is not so it is entirely the responsibility of the third-party plugin that defines it to, ideally, link it to a built-in highlight group.

    FWIW2, thid-party colorschemes that don't handle 100% of the built-in highlight groups should be considered broken.

    --- EDIT ---

    The built-in colorschemes have all been remade since I wrote this answer, with special care for the Pmenu* highlight groups. They have probably been pulled-in by Neovim already but I don't know since I don't follow that project.

    If you are using one of the built-in colorschemes beside default AND CocInfoFloat is linked to a default highlight group, then it should look better, now.

    Original desert in a 256c terminal emulator:

    Original desert in 256c

    Remade desert in a 256c terminal emulator:

    Remade desert in a 256c terminal emulator

    The original colorschemes actually inherited a lot (including pmenu*) from the default colorscheme, which doesn't work like the others, as it is a mix of hardcoded and softcoded values. We are currently looking into it but it will take time. In the mean time, enjoy the remakes and the new ones:

    zaibatsu

    lunaperche

    quiet

    etc.