mirror of
https://github.com/Ascyii/nvim.git
synced 2026-01-01 12:14:24 -05:00
22 lines
539 B
Lua
22 lines
539 B
Lua
local function rounded_border()
|
|
return { '╭', '─', '╮', '│', '╯', '─', '╰', '│' }
|
|
end
|
|
|
|
-- Buffer the original fuction
|
|
local nvim_open_win = vim.api.nvim_open_win
|
|
|
|
-- Set color to a slight gray
|
|
vim.api.nvim_set_hl(0, 'FloatBorder', { bg = 'None', fg = '#a0a0a0' })
|
|
vim.api.nvim_set_hl(0, 'NormalFloat', { bg = 'None' })
|
|
|
|
-- Border overwrite
|
|
vim.api.nvim_open_win = function(buf, enter, opts)
|
|
opts = opts or {}
|
|
|
|
if opts.border == nil then
|
|
opts.border = rounded_border()
|
|
end
|
|
|
|
return nvim_open_win(buf, enter, opts)
|
|
end
|