add border to floating window for documentation and autocomplete
This commit is contained in:
parent
b2a3033820
commit
529924b099
|
@ -6,6 +6,20 @@ if not vim.loop.fs_stat(lazypath) then
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||||
|
|
||||||
|
local _border = "single"
|
||||||
|
|
||||||
|
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 },
|
||||||
|
})
|
||||||
|
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
return {
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
dependencies = { "hrsh7th/cmp-emoji" },
|
||||||
|
---@param opts cmp.ConfigSchema
|
||||||
|
opts = function(_, opts)
|
||||||
|
local cmp = require("cmp")
|
||||||
|
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "emoji" } }))
|
||||||
|
cmp.setup({
|
||||||
|
window = {
|
||||||
|
completion = {
|
||||||
|
border = "single",
|
||||||
|
-- winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,CursorLine:PmenuThumb,Search:None",
|
||||||
|
},
|
||||||
|
documentation = {
|
||||||
|
border = "single",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
Loading…
Reference in New Issue