fixed lazygit

This commit is contained in:
Oliver Hartmann 2024-06-07 00:24:45 +02:00
parent ae5b5fd06b
commit 02182b7711

View File

@ -18,10 +18,14 @@ return {
}) })
local Terminal = require('toggleterm.terminal').Terminal local Terminal = require('toggleterm.terminal').Terminal
function _lazygit_toggle()
local lazygit = Terminal:new({ local lazygit = Terminal:new({
cmd = 'lazygit', cmd = 'lazygit',
dir = vim.fn.getcwd(),
direction = 'float', direction = 'float',
cwd = function()
return vim.fn.getcwd()
end,
float_opts = { float_opts = {
border = 'double', border = 'double',
}, },
@ -35,9 +39,7 @@ return {
vim.cmd('startinsert!') vim.cmd('startinsert!')
end, end,
}) })
lazygit:open()
function _lazygit_toggle()
lazygit:toggle()
end end
end, end,
keys = { keys = {