Skip to content

Commit

Permalink
commitj
Browse files Browse the repository at this point in the history
  • Loading branch information
xiantang committed Oct 22, 2023
1 parent 9563c99 commit f015437
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lua/plugins/terminal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ return {
require("toggleterm").setup({
direction = "float",
})
local Terminal = require("toggleterm.terminal").Terminal
local lazygit = Terminal:new({ cmd = "sudo lazygit", hidden = true })

function _lazygit_toggle()
lazygit:toggle()
end

vim.api.nvim_set_keymap(
"n",
"<leader>g",
"<cmd>lua _lazygit_toggle()<CR>",
{ noremap = true, silent = true }
)
end,
},
}

0 comments on commit f015437

Please sign in to comment.