mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-06-21 08:35:57 +02:00
feat(api): allow passing options to float so it can be used outside of lazy
This commit is contained in:
parent
d205cd45d0
commit
2a617a7024
2 changed files with 6 additions and 4 deletions
|
@ -84,10 +84,10 @@ function M.throttle(ms, fn)
|
|||
end
|
||||
|
||||
---@param cmd string[]
|
||||
---@param opts? {cwd:string, filetype:string, terminal?:boolean, close_on_exit?:boolean, enter?:boolean}
|
||||
---@param opts? {cwd:string, filetype:string, terminal?:boolean, close_on_exit?:boolean, enter?:boolean, float?:LazyViewOptions}
|
||||
function M.open_cmd(cmd, opts)
|
||||
opts = opts or {}
|
||||
local float = M.float()
|
||||
local float = M.float(opts.float)
|
||||
|
||||
if opts.filetype then
|
||||
vim.bo[float.buf].filetype = opts.filetype
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue