From: Huck Boles Date: Sun, 23 Apr 2023 13:03:16 +0000 (-0500) Subject: lsp popup borders X-Git-Url: https://git.huck.website/?a=commitdiff_plain;h=3df9d0f37cf5be9a25420caffc7db34567dad9b7;p=nvim.git lsp popup borders --- diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 8e35700..bab7137 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -32,6 +32,25 @@ return { lspconfig[server_name].setup({}) end }) + + local border = { + {"┌", "FloatBorder"}, + {"─", "FloatBorder"}, + {"┐", "FloatBorder"}, + {"│", "FloatBorder"}, + {"┘", "FloatBorder"}, + {"─", "FloatBorder"}, + {"└", "FloatBorder"}, + {"│", "FloatBorder"}, + } + + -- To instead override globally + local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview + function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...) + opts = opts or {} + opts.border = opts.border or border + return orig_util_open_floating_preview(contents, syntax, opts, ...) + end end }, } diff --git a/lua/theme.lua b/lua/theme.lua index d86ae42..e2a3b11 100644 --- a/lua/theme.lua +++ b/lua/theme.lua @@ -101,6 +101,7 @@ highlight("PmenuSbar", white, black, nil, c_black, nil, nil) highlight("PmenuThumb", grey, black, nil, c_black, nil, nil) highlight("PmenuSel", green, black, c_green, c_black, nil, nil) highlight("VertSplit", dark_grey, black, c_grey, nil, nil) +highlight("FloatBorder", dark_grey, black, c_grey, c_black, nil, nil) highlight("TabLine", black, grey, c_black, c_grey, nil, nil) highlight("TabLineFill", grey, black, c_grey, c_black, nil, nil) highlight("TablineSel", grey, black, c_grey, c_white, bold, nil)