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

Can I set a separate background color for the coc error floating window? #5109

Open
Archdsenna opened this issue Aug 13, 2024 · 2 comments
Open

Comments

@Archdsenna
Copy link

Archdsenna commented Aug 13, 2024

I want to change the background color of the coc error floating window (CocErrorFloat). I added the following configuration in init.vim:

highlight! link CocErrorFloat NONE
hi CocErrorFloat ctermfg=1 ctermbg=228
Normally, this will change the background color of the CocErrorFloat to light yellow.

But it did not take effect:
image

If I modify the background color of CocFloating, I can change the background color of the coc floating warning, but this will also change the background color of other floating windows (such as the completion list). I only want to modify the floating background color of CocErrorFloat alone.

Is it impossible to change the background color of CocErrorFloat?

@fannheyward
Copy link
Member

You can set with dialog.floatHighlight, by default it's CocFloating, check :h coc-config-dialog-floatHighlight.

@Archdsenna
Copy link
Author

h coc-config-dialog-floatHighlight

Thanks for your help. I have set dialog.floatHighlight as a custom highlight group, as shown below:
Custom highlight group, in init.vim
hi myhelight ctermfg=1 ctermbg=228

In coc-settings.json:
"dialog.floatHighlight": "myhelight"

But it seems that it still hasn't taken effect.
image

Is there something I configured wrong?

@fannheyward fannheyward reopened this Aug 17, 2024
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

2 participants