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
function _lazygit_toggle()
local lazygit = Terminal:new({
cmd = 'lazygit',
dir = vim.fn.getcwd(),
direction = 'float',
cwd = function()
return vim.fn.getcwd()
end,
float_opts = {
border = 'double',
},
@ -35,9 +39,7 @@ return {
vim.cmd('startinsert!')
end,
})
function _lazygit_toggle()
lazygit:toggle()
lazygit:open()
end
end,
keys = {