Skip to content
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

Incorrect highlighting #1649

Closed
HUAHUAI23 opened this issue Jul 8, 2023 · 3 comments
Closed

Incorrect highlighting #1649

HUAHUAI23 opened this issue Jul 8, 2023 · 3 comments

Comments

@HUAHUAI23
Copy link

When using nvim --headless and connecting with neovide, the highlighting of the cmp plugin is problematic, has anyone encountered this?
image

@williamhCode
Copy link

williamhCode commented Mar 31, 2024

I am working on a neovim gui and have encountered the same problem.
neovim/neovim#28120

@zeertzjq
Copy link
Contributor

The following change to nvim-cmp should fix this problem:

diff --git a/plugin/cmp.lua b/plugin/cmp.lua
index 0e5e691..611b5c9 100644
--- a/plugin/cmp.lua
+++ b/plugin/cmp.lua
@@ -25,7 +25,7 @@ for kind in pairs(types.lsp.CompletionItemKind) do
   end
 end
 
-autocmd.subscribe('ColorScheme', function()
+autocmd.subscribe({ 'ColorScheme', 'UIEnter' }, function()
   highlight.inherit('CmpItemAbbrDefault', 'Pmenu', { bg = 'NONE', default = false })
   highlight.inherit('CmpItemAbbrDeprecatedDefault', 'Comment', { bg = 'NONE', default = false })
   highlight.inherit('CmpItemAbbrMatchDefault', 'Pmenu', { bg = 'NONE', default = false })

@hrsh7th
Copy link
Owner

hrsh7th commented Mar 31, 2024

It was difficult to arrive at this on my own...
Thank you very much!

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

No branches or pull requests

4 participants