feat(input): add winblend as a config option

This commit is contained in:
Steven Arcangeli 2021-12-08 18:49:07 -08:00
parent 189bbc6562
commit dbfca4da6a
2 changed files with 5 additions and 0 deletions

View File

@ -18,6 +18,9 @@ local default_config = {
max_width = nil,
min_width = 20,
-- Window transparency (0-100)
winblend = 10,
-- see :help dressing-prompt
prompt_buffer = false,

View File

@ -182,6 +182,7 @@ setmetatable(M, {
on_confirm = on_confirm,
opts = opts,
}
vim.api.nvim_win_set_option(winid, "winblend", config.winblend)
-- Finish setting up the buffer
vim.api.nvim_buf_set_option(bufnr, "swapfile", false)
@ -241,6 +242,7 @@ setmetatable(M, {
if winid == context.winid then
context.title_winid = title_winid
end
vim.api.nvim_win_set_option(title_winid, "winblend", config.winblend)
vim.api.nvim_buf_set_lines(titlebuf, 0, -1, true, { " " .. trimmed_prompt })
vim.api.nvim_buf_set_option(titlebuf, "bufhidden", "wipe")
end, 5)