optimize: don't create lazygit term until toggle
This commit is contained in:
parent
ffde2ccc24
commit
4fd10f828e
|
|
@ -89,13 +89,16 @@ return {
|
|||
'akinsho/toggleterm.nvim',
|
||||
config = function()
|
||||
local Terminal = require('toggleterm.terminal').Terminal
|
||||
local lazygit = Terminal:new({
|
||||
local lazygit = nil
|
||||
|
||||
function _lazygit_toggle()
|
||||
if lazygit == nil then
|
||||
lazygit = Terminal:new({
|
||||
cmd = "lazygit",
|
||||
hidden = true,
|
||||
direction = 'float',
|
||||
})
|
||||
|
||||
function _lazygit_toggle()
|
||||
end
|
||||
lazygit:toggle()
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue