Explorar o código

feat: rounded border for hover and signatureHelp (#4131)

Co-authored-by: LostNeophyte <lostneophyte@tuta.io>
Christian Chiarulli %!s(int64=2) %!d(string=hai) anos
pai
achega
55e7fdb9d1
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  1. 9 0
      lua/lvim/lsp/init.lua

+ 9 - 0
lua/lvim/lsp/init.lua

@@ -111,6 +111,15 @@ function M.setup()
   require("lvim.lsp.null-ls").setup()
 
   autocmds.configure_format_on_save()
+
+  local function set_handler_opts_if_not_set(name, handler, opts)
+    if debug.getinfo(vim.lsp.handlers[name], "S").source:match(vim.env.VIMRUNTIME) then
+      vim.lsp.handlers[name] = vim.lsp.with(handler, opts)
+    end
+  end
+
+  set_handler_opts_if_not_set("textDocument/hover", vim.lsp.handlers.hover, { border = "rounded" })
+  set_handler_opts_if_not_set("textDocument/signatureHelp", vim.lsp.handlers.signature_help, { border = "rounded" })
 end
 
 return M