Open RigottiG opened 1 year ago
I encountered this issue yesterday. This is most likely because in cmp.setup()
your definition for window.completion.winhighlight
is missing CursorLine
since the docs for nvim-cmp
are misleading. I set winhighlight
it to "Normal:Pmenu,FloatBorder:Pmenu,CursorLine:PmenuSel,Search:None"
and it worked.
You may also want to customize the Pmenu
highlight to something nicer, since it also modifies the foreground colors of the entry once selected. I added vim.api.nvim_set_hl(0, "PmenuSel", { bg = "#393f4a", fg = "NONE" })
to my config after the theme is loaded. #393f4a
is the color for dark.bg2
as defined in lua/onedark/palette.lua
of this repo. It looks like you might be using a variant of the theme, so pick the appropriate hex value.
After I install Onedark, the cmp stopped working the highlight.
I have a minimal setup for Onedark and the highlight works on NeoTree or Telescope for example.