feat(util): float_term using lazy's API

This commit is contained in:
Folke Lemaitre 2023-01-02 17:36:26 +01:00
parent b62655f0b9
commit 08e6a880f5
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -62,4 +62,17 @@ function M.telescope(builtin, opts)
end
end
function M.float_term(cmd, opts)
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 },
},
}, opts or {})
require("lazy.util").open_cmd(cmd, opts)
end
return M