master #1
@@ -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 = {
|
||||||
|
|||||||
Reference in New Issue
Block a user