mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-19 21:06:46 +00:00
refactor: split open_cmd in float_cmd and float_term
This commit is contained in:
parent
13af39b83e
commit
e89e938991
3 changed files with 42 additions and 37 deletions
|
@ -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,
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue