:LspInfo window border

Is there any way to add a border around the window that appears on LspInfo command?
LspInfo window looks confusing without borders with projekt0n/github-nvim-theme. You may look at the screenshot below
The only way I found is to manually change the plugin’s lspconfig/ui/windows.lua file. Which is a bad solution, because I will loose this change updating plugin. Did anyone tried this and succeeded?
I guess that there is no way, because I could not find any configuration option to set a border that is reachable from the outside of the plugin itself.

Should I make a pull request to expose some option that will enable setting borders?

What’s the change? Should already be possible to use that option externally.

1 Like

I modified win_float.default_opts function. Specifically I changed the opts local table variable inside the function, replacing its default border setting with

border = 'single'

But I can’t change it externally. I tried overriding plugins’s defualt_opts in my init.lua config file, but it does not affect the window. Only changing it inside plugin did the job.

Oh, that’s weird right there, the function isn’t really using anything from the default_options table other than percentage. Whatever, this should work:

local win = require('lspconfig.ui.windows')
local _default_opts = win.default_opts

win.default_opts = function(options)
  local opts = _default_opts(options)
  opts.border = 'single'
  return opts
end
1 Like

Cool, it worked! Thank you

Fwiw I added lspinfo as a debugging tool and still consider it as such. I personally don’t see the value in ui customization. I did semi vendor parts of plenary in assumption of us upstream of the float code which didn’t materialize.

i upgrade my neovim to v0.8.0-dev, and now this configuration doesn’t seem to work

After 03981bd, you could just set the border with:

         require('lspconfig.ui.windows').default_options.border = 'single'
1 Like