In neovim, these keymaps (from nvim-lspconfig) show diagnostics from LSP servers on a floating window:
vim.keymap.set('n', '<leader>le', vim.diagnostic.open_float, opts)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
The floating window uses highlight group :h hl-NormalFloat
. I set its background to be equal to :h hl-Normal
so it looks like a transparent window. The problem is: now I can't distinguish between the floating window and the main window.
I could reset the background color of NormalFloat
to something distinguishable than Normal
, but that would not work properly with the highlighting colors of the diagnostic messages. Adding a border around the floating would be the best solution. How do I do that?