Lsp hover window changes

Recently updated my local build of neovim to match head, and noticing floating windows got some design updates. What highlight group can be used to style this?

It’s handled by the LspDiagnosticsFloating* groups (which link to LspDiagnosticsDefault* by default). In this case it’s probably an error, so:

:hi LspDiagnosticsFloatingError guifg=yellow

BTW, since you use a black bg float on another black background… you might like slapping a border around it, e.g.:

vim.lsp.diagnostic.show_line_diagnostics({show_header = false, border = "single"})

Ahh, ok. Good to know. So this covers each line, but is the floating window it self no longer getting a highlight? Like I used to do something like in nvim-typescript to highlight the whole buffer/window

window.setOption('winhl', 'Normal:nvimTypescriptPopupNormal,EndOfBuffer:nvimTypescriptEndOfBuffer'),

And the whole window would be highlighted. Seems like this changed in the last few weeks/month.

The official group for floats is NormalFloat now. (For the border it’s FloatBorder, but borders are a very recent addition.)

So, in your plugin you probably want to continue using 'winhl' with NormalFloat instead of Normal, but for your colorscheme you might want highlight! link NormalFloat SomethingCool.

@mhartington if you use Lsp saga there’s a bug/change that overwrites normal float for all windows which hasn’t been fixed yet Custom highlight group to override NormalFloat · Issue #183 · glepnir/lspsaga.nvim · GitHub. Not sure if you do but just FYI

1 Like