nvim: lsp: fix hover popup

This commit is contained in:
tastytea 2022-08-17 03:50:15 +02:00
parent 8557936586
commit f7da1d9062
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM

View File

@ -64,14 +64,12 @@ local on_attach = function(client, bufnr)
}, bufnr)
end
-- show help on hover -- cursor ends up in popup
-- show help on hover
if client.resolved_capabilities.hover then
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
group = 'config_lsp',
buffer = bufnr,
callback = function()
vim.lsp.buf.hover({ focusable = false })
end
callback = vim.lsp.buf.hover
})
end
end
@ -82,8 +80,9 @@ local capabilities = require('cmp_nvim_lsp').update_capabilities(
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(
vim.lsp.handlers.hover, {
border = "rounded",
border = 'rounded',
width = 60,
focusable = false
})
-- setup servers