]> git.huck.website - nvim.git/commitdiff
lsp popup borders
authorHuck Boles <huck@huck.website>
Sun, 23 Apr 2023 13:03:16 +0000 (08:03 -0500)
committerHuck Boles <huck@huck.website>
Sun, 23 Apr 2023 13:03:16 +0000 (08:03 -0500)
lua/plugins/lsp.lua
lua/theme.lua

index 8e35700007df25169891f4493d08e3687cddc763..bab7137f958000d5041a35611cbada1702a8b288 100644 (file)
@@ -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
     },
 }
index d86ae42ae6632147b21f47b97f69b9de6c482eed..e2a3b11d69eaf0237fe52d70117a3cdc711d60ee 100644 (file)
@@ -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)