aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2022-07-29 14:50:14 +0100
committerJuan J. Martinez <jjm@usebox.net>2022-07-29 14:50:14 +0100
commit5c6670ec79e294e5d847a063f6c74f23afa84c11 (patch)
tree012b4de0e9cc8108453890c452a4feb49ae37d74
parenta3a82e146799bf6810ff5e09aa8518accfd2b81d (diff)
downloaddotnvim-5c6670ec79e294e5d847a063f6c74f23afa84c11.tar.gz
dotnvim-5c6670ec79e294e5d847a063f6c74f23afa84c11.zip
Better UI by adding a border in floating windows
-rw-r--r--lsp.lua14
1 files changed, 14 insertions, 0 deletions
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 = {