From 59ebf9cf9ad55a6f84770608b8a0274fba302fc7 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Sun, 6 Aug 2023 17:09:06 +0200 Subject: [PATCH] vim/lsp: enable rounded borders on floating windows --- config/nvim/lua/user/plugins/lsp.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/nvim/lua/user/plugins/lsp.lua b/config/nvim/lua/user/plugins/lsp.lua index f86f811..ba0520d 100644 --- a/config/nvim/lua/user/plugins/lsp.lua +++ b/config/nvim/lua/user/plugins/lsp.lua @@ -1,4 +1,14 @@ local config = function() + -- Enable rounded borders for LSP handlers and :LspInfo windows. + local border = 'rounded' + for request, handler in pairs { + ['textDocument/hover'] = vim.lsp.handlers.hover, + ['textDocument/signatureHelp'] = vim.lsp.handlers.signature_help, + } do + vim.lsp.handlers[request] = vim.lsp.with(handler, { border = border }) + end + require('lspconfig.ui.windows').default_options = { border = border } + local capabilities = vim.lsp.protocol.make_client_capabilities() local has_cmp_nvim_lsp, cmp = pcall(require, 'cmp_nvim_lsp') if has_cmp_nvim_lsp then