From 5c6670ec79e294e5d847a063f6c74f23afa84c11 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Fri, 29 Jul 2022 14:50:14 +0100 Subject: Better UI by adding a border in floating windows --- lsp.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lsp.lua') diff --git a/lsp.lua b/lsp.lua index 33a5b2b..d73c189 100644 --- a/lsp.lua +++ b/lsp.lua @@ -32,6 +32,20 @@ for type, icon in pairs(signs) do vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) end +-- better UI +vim.lsp.handlers["textDocument/hover"] = vim.lsp.with( + vim.lsp.handlers.hover, { + -- Use a sharp border with `FloatBorder` highlights + border = "single" + } +) +vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with( + vim.lsp.handlers.signature_help, { + -- Use a sharp border with `FloatBorder` highlights + border = "single" + } +) + -- Use a loop to conveniently call 'setup' on multiple servers and -- map buffer local keybindings when the language server attaches local servers = { -- cgit v1.2.3