frames around popups

main
Mathias Rothenhaeusler 2023-08-28 20:03:04 +02:00
parent a579401524
commit 0aad9059b6
1 changed files with 24 additions and 2 deletions

View File

@ -12,6 +12,28 @@ end
local keymap = vim.keymap -- for conciseness
---------- border >------------------------------
local _border = "single"
require('lspconfig.ui.windows').default_options = {
border = _border
}
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(
vim.lsp.handlers.hover, {
border = _border
}
)
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(
vim.lsp.handlers.signature_help, {
border = _border
}
)
vim.diagnostic.config {
float = { border = _border }
}
---------- </border ------------------------------
-- enable keybinds only for when lsp server available
local on_attach = function(_, bufnr)
-- keybind options
@ -26,6 +48,7 @@ local on_attach = function(_, bufnr)
keymap.set("n", "<leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts) -- format code
keymap.set("n", "<leader>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>", opts) -- see available code actions
keymap.set("n", "<leader>ed", "<cmd>Telescope diagnostics<CR>", opts) -- jump to previous diagnostic in buffer
-- keymap.set("n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", opts) -- show documentation for what is under cursor
keymap.set(
"n",
"<leader>cbf",
@ -33,8 +56,7 @@ local on_attach = function(_, bufnr)
{ noremap = true, silent = false, buffer = bufnr }
)
keymap.set("n", "<leader>o", "<cmd>LSoutlineToggle<CR>", opts) -- see outline on right hand side
keymap.set("n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", opts) -- show documentation for what is under cursor
keymap.set("n", "<leader>o", "<cmd>Lspsaga outline<CR>", opts) -- see outline on right hand side
-- LSP Saga