diff --git a/.config/nvim/lua/my/lsp.lua b/.config/nvim/lua/my/lsp.lua index 7bbfd7f..4f5152f 100644 --- a/.config/nvim/lua/my/lsp.lua +++ b/.config/nvim/lua/my/lsp.lua @@ -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