diff --git a/neovim/init.lua b/neovim/init.lua index 673b2b0..65ece48 100644 --- a/neovim/init.lua +++ b/neovim/init.lua @@ -457,6 +457,27 @@ vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Diagnostic: go to vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Diagnostic: go to next' }) vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Diagnostic: set loclist' }) +-- Add a border to LSP windows +local _border = "single" + +vim.lsp.handlers["textDocument/hover"] = vim.lsp.with( + vim.lsp.handlers.hover, { + border = _border + } +) + +-- TODO: Is this necessary? Or is signature help being handled with LSPSaga? +--[[ +vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with( + vim.lsp.handlers.signature_help, { + border = _border + } +) +--]] + +vim.diagnostic.config{ + float = { border = _border, max_width = 120 } +} -- Use LspAttach autocommand to only map the following keys -- after the language server attaches to the current buffer vim.api.nvim_create_autocmd('LspAttach', {