mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-30 04:24:35 +02:00
refactor: use latest lazy float_term API
This commit is contained in:
parent
05ec629d7b
commit
a91d4a6861
2 changed files with 7 additions and 11 deletions
|
@ -60,18 +60,14 @@ function M.telescope(builtin, opts)
|
|||
end
|
||||
end
|
||||
|
||||
-- Opens a floating terminal (interactive by default)
|
||||
---@param cmd? string[]|string
|
||||
---@param opts? LazyCmdOptions|{interactive?:boolean}
|
||||
function M.float_term(cmd, opts)
|
||||
cmd = cmd or { vim.env.SHELL or vim.o.shell }
|
||||
opts = vim.tbl_deep_extend("force", {
|
||||
terminal = true,
|
||||
close_on_exit = true,
|
||||
enter = true,
|
||||
float = {
|
||||
size = { width = 0.9, height = 0.9 },
|
||||
margin = { top = 0, right = 0, bottom = 0, left = 0 },
|
||||
},
|
||||
size = { width = 0.9, height = 0.9 },
|
||||
}, opts or {})
|
||||
require("lazy.util").open_cmd(cmd, opts)
|
||||
require("lazy.util").float_term(cmd, opts)
|
||||
end
|
||||
|
||||
---@param silent boolean?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue