Missing borders on floating windows #217
-
I just upgraded to version 2.x and I lost borders (and other configs) on floating windows. This is my lsp-zero config: local lsp = require('lsp-zero').preset('recommended')
lsp.on_attach(function(client, bufnr)
lsp.default_keymaps({buffer = bufnr})
end)
require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls())
lsp.setup_nvim_cmp({
formatting = {
fields = {'abbr', 'kind', 'menu'},
format = require('lspkind').cmp_format({
mode = 'symbol_text', -- show only symbol annotations
maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
})
}
})
lsp.setup() I also tried by adding: -- diagnostic config
vim.diagnostic.config({
virtual_text = true,
signs = true,
update_in_insert = false,
underline = true,
severity_sort = false,
float = {
focusable = false,
style = 'minimal',
border = 'rounded',
source = 'always',
header = '',
prefix = '',
},
}) but didn't work. This is how it looks now: Do you know how to restore diagnostics borders? |
Beta Was this translation helpful? Give feedback.
Answered by
VonHeikemen
Apr 25, 2023
Replies: 1 comment 2 replies
-
Use the local lsp = require('lsp-zero').preset('recommended')
require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls())
lsp.setup()
local cmp = require('cmp')
cmp.setup({
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
formatting = {
fields = {'abbr', 'kind', 'menu'},
format = require('lspkind').cmp_format({
mode = 'symbol_text', -- show only symbol annotations
maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
})
}
}) side note: you don't need to call |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
All the options for the completion menu are under
manage_nvim_cmp
. The optionfloat_border
modifies the windows for the "hover" action, signature help, and error message window.