diff options
author | Jacek Kiedrowski <[email protected]> | 2021-07-05 20:15:25 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-07-05 20:15:25 +0100 |
commit | 1f32f7737a544d539b2251cbdb2b717ff7e06458 (patch) | |
tree | 7c0b4e3e928833972efe282eb84dc25b70235b25 /lua/lsp/init.lua | |
parent | 97d7adfb2f710345bf5d6a0cac4d76900f11fd38 (diff) | |
parent | 6b41286d70b71184b915724a0a03ccd8ec3b4e16 (diff) |
Merge branch 'ChristianChiarulli:master' into master
Diffstat (limited to 'lua/lsp/init.lua')
-rw-r--r-- | lua/lsp/init.lua | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lua/lsp/init.lua b/lua/lsp/init.lua index ad8985d8..0292064a 100644 --- a/lua/lsp/init.lua +++ b/lua/lsp/init.lua @@ -22,8 +22,8 @@ vim.cmd("nnoremap <silent> gr <cmd>lua vim.lsp.buf.references()<CR>") vim.cmd("nnoremap <silent> gi <cmd>lua vim.lsp.buf.implementation()<CR>") vim.cmd("nnoremap <silent> K :lua vim.lsp.buf.hover()<CR>") -- vim.cmd('nnoremap <silent> <C-k> <cmd>lua vim.lsp.buf.signature_help()<CR>') -vim.cmd("nnoremap <silent> <C-p> :lua vim.lsp.diagnostic.goto_prev()<CR>") -vim.cmd("nnoremap <silent> <C-n> :lua vim.lsp.diagnostic.goto_next()<CR>") +vim.cmd("nnoremap <silent> <C-p> :lua vim.lsp.diagnostic.goto_prev({popup_opts = {border = O.lsp.popup_border}})<CR>") +vim.cmd("nnoremap <silent> <C-n> :lua vim.lsp.diagnostic.goto_next({popup_opts = {border = O.lsp.popup_border}})<CR>") -- scroll down hover doc or scroll in definition preview -- scroll up hover doc vim.cmd('command! -nargs=0 LspVirtualTextToggle lua require("lsp/virtual_text").toggle()') @@ -41,6 +41,18 @@ vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( } ) +vim.lsp.handlers["textDocument/hover"] = vim.lsp.with( + vim.lsp.handlers.hover, { + border = O.lsp.popup_border + } +) + +vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with( + vim.lsp.handlers.signature_help, { + border = O.lsp.popup_border + } +) + -- symbols for autocomplete vim.lsp.protocol.CompletionItemKind = { " ï’ž (Text) ", |