require("toggleterm").setup {
    open_mapping = [[<leader>=]],
    insert_mappings = false -- don't map the key in insert mode
}

local Terminal = require('toggleterm.terminal').Terminal
-- create a lazygit window with the lazygit command
local lazygit = Terminal:new({
    cmd = "lazygit",
    hidden = true,
    direction = 'float',
    float_opts = {border = "curved"}
})
function _Lazygit_toggle() lazygit:toggle() end
vim.cmd([[command! Lazygit :lua _Lazygit_toggle()<cr>]])

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