refactor: split open_cmd in float_cmd and float_term

This commit is contained in:
Folke Lemaitre 2023-01-05 17:36:01 +01:00
parent 13af39b83e
commit e89e938991
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
3 changed files with 42 additions and 37 deletions

View file

@ -72,21 +72,15 @@ M.defaults = {
-- open lazygit log
["<localleader>l"] = function(plugin)
require("lazy.util").open_cmd({ "lazygit", "log" }, {
require("lazy.util").float_term({ "lazygit", "log" }, {
cwd = plugin.dir,
terminal = true,
close_on_exit = true,
enter = true,
})
end,
-- open a terminal for the plugin dir
["<localleader>t"] = function(plugin)
require("lazy.util").open_cmd({ vim.go.shell }, {
require("lazy.util").float_term(nil, {
cwd = plugin.dir,
terminal = true,
close_on_exit = true,
enter = true,
})
end,
},