refactor: use latest lazy float_term API

This commit is contained in:
Folke Lemaitre 2023-01-05 17:55:18 +01:00
parent 05ec629d7b
commit a91d4a6861
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 7 additions and 11 deletions

View file

@ -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?