added winopts_raw option for advanced window customiztaion

main
bhagwan 3 years ago
parent e6ad43e030
commit 1cb4ae1b0e

@ -301,3 +301,9 @@ EOF
+ [ ] git commits
+ [ ] git branches
+ [ ] LSP (refs, symbols, etc)
### Credits
Big thank you to all those I borrowed code/ideas from, I read so many configs
and plugin codes that I probably forgot where I found some samples from so if
I missed your name feel free to contact me and I'll add it below:

@ -254,8 +254,13 @@ M.winopts = function(opts)
"win_height", "win_width",
"win_row", "win_col", "win_border",
"window_on_create",
"winopts_raw",
})
if opts.winopts_raw and type(opts.winopts_raw) == "function" then
return opts.winopts_raw()
end
local height = math.floor(vim.o.lines * opts.win_height)
local width = math.floor(vim.o.columns * opts.win_width)
local row = math.floor((vim.o.lines - height) * opts.win_row)

@ -51,6 +51,7 @@ function M.setup(opts)
win_row = "number",
win_col = "number",
win_border = "any", -- boolean|table (borderchars)
winopts_raw = "function",
default_prompt = "string",
fzf_args = "string",
fzf_layout = "string",

Loading…
Cancel
Save