nvim: lsp: fix hover popup
This commit is contained in:
parent
8557936586
commit
f7da1d9062
|
@ -64,14 +64,12 @@ local on_attach = function(client, bufnr)
|
||||||
}, bufnr)
|
}, bufnr)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- show help on hover -- cursor ends up in popup
|
-- show help on hover
|
||||||
if client.resolved_capabilities.hover then
|
if client.resolved_capabilities.hover then
|
||||||
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
|
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
|
||||||
group = 'config_lsp',
|
group = 'config_lsp',
|
||||||
buffer = bufnr,
|
buffer = bufnr,
|
||||||
callback = function()
|
callback = vim.lsp.buf.hover
|
||||||
vim.lsp.buf.hover({ focusable = false })
|
|
||||||
end
|
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
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["textDocument/hover"] = vim.lsp.with(
|
||||||
vim.lsp.handlers.hover, {
|
vim.lsp.handlers.hover, {
|
||||||
border = "rounded",
|
border = 'rounded',
|
||||||
width = 60,
|
width = 60,
|
||||||
|
focusable = false
|
||||||
})
|
})
|
||||||
|
|
||||||
-- setup servers
|
-- setup servers
|
||||||
|
|
Loading…
Reference in New Issue
Block a user