feat(input): add winblend as a config option
This commit is contained in:
parent
189bbc6562
commit
dbfca4da6a
|
@ -18,6 +18,9 @@ local default_config = {
|
||||||
max_width = nil,
|
max_width = nil,
|
||||||
min_width = 20,
|
min_width = 20,
|
||||||
|
|
||||||
|
-- Window transparency (0-100)
|
||||||
|
winblend = 10,
|
||||||
|
|
||||||
-- see :help dressing-prompt
|
-- see :help dressing-prompt
|
||||||
prompt_buffer = false,
|
prompt_buffer = false,
|
||||||
|
|
||||||
|
|
|
@ -182,6 +182,7 @@ setmetatable(M, {
|
||||||
on_confirm = on_confirm,
|
on_confirm = on_confirm,
|
||||||
opts = opts,
|
opts = opts,
|
||||||
}
|
}
|
||||||
|
vim.api.nvim_win_set_option(winid, "winblend", config.winblend)
|
||||||
|
|
||||||
-- Finish setting up the buffer
|
-- Finish setting up the buffer
|
||||||
vim.api.nvim_buf_set_option(bufnr, "swapfile", false)
|
vim.api.nvim_buf_set_option(bufnr, "swapfile", false)
|
||||||
|
@ -241,6 +242,7 @@ setmetatable(M, {
|
||||||
if winid == context.winid then
|
if winid == context.winid then
|
||||||
context.title_winid = title_winid
|
context.title_winid = title_winid
|
||||||
end
|
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_lines(titlebuf, 0, -1, true, { " " .. trimmed_prompt })
|
||||||
vim.api.nvim_buf_set_option(titlebuf, "bufhidden", "wipe")
|
vim.api.nvim_buf_set_option(titlebuf, "bufhidden", "wipe")
|
||||||
end, 5)
|
end, 5)
|
||||||
|
|
Loading…
Reference in New Issue