From 0598663b420de37f364d649bf856c888f01672d3 Mon Sep 17 00:00:00 2001 From: Ade Attwood Date: Fri, 20 Jan 2023 07:55:47 +0000 Subject: [PATCH] feat(vim): support nvim diagnostic popups for lsp This has a better look and it makes all the hover popups look the same from the linters to lsp. --- site-modules/core/files/vim/plugin/lsp.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/site-modules/core/files/vim/plugin/lsp.lua b/site-modules/core/files/vim/plugin/lsp.lua index 2505eaa..fb79978 100644 --- a/site-modules/core/files/vim/plugin/lsp.lua +++ b/site-modules/core/files/vim/plugin/lsp.lua @@ -70,3 +70,16 @@ vim.fn.sign_define( "DiagnosticSignError", { text = "✖", texthl = "DiagnosticSignError", numhl = "DiagnosticSignError" } ) + +local border = 'rounded' + +vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {border = border}) +vim.lsp.handlers["textDocument/show_line_diagnostics"] = vim.lsp.with(vim.lsp.handlers.hover, {border = border}) +vim.lsp.handlers["textDocument/diagnostic"] = vim.lsp.with(vim.lsp.handlers.hover, {border = border}) +vim.lsp.handlers["textDocument/diagnostics"] = vim.lsp.with(vim.lsp.handlers.hover, {border = border}) +vim.diagnostic.config({ + float = { + focusable=false, + border = border + } +})