2023-02-27 20:09:48 +01:00
|
|
|
local env = require("my.helpers.env")
|
|
|
|
|
|
|
|
local M = {
|
|
|
|
"TimUntersberger/neogit",
|
2023-04-17 15:19:41 +02:00
|
|
|
dependencies = { "nvim-lua/plenary.nvim" },
|
2023-02-27 20:09:48 +01:00
|
|
|
cmd = "Neogit",
|
2023-03-30 02:54:57 +02:00
|
|
|
cond = env.firenvim.not_active() and env.vscode.not_active(),
|
2023-02-27 20:09:48 +01:00
|
|
|
init = function()
|
|
|
|
vim.keymap.set("n", "<C-g>", "<cmd>Neogit<cr>", { desc = "Open neo[g]it" })
|
|
|
|
end,
|
|
|
|
config = function()
|
2023-11-11 06:55:14 +01:00
|
|
|
require("neogit").setup({})
|
2023-02-27 20:09:48 +01:00
|
|
|
|
|
|
|
-- {{{ Disable folds inside neogit
|
|
|
|
vim.api.nvim_create_autocmd("FileType", {
|
|
|
|
pattern = { "NeogitStatus" },
|
|
|
|
group = vim.api.nvim_create_augroup("NeogitStatusOptions", {}),
|
|
|
|
callback = function()
|
|
|
|
vim.opt.foldenable = false
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
-- }}}
|
|
|
|
end,
|
|
|
|
}
|
|
|
|
|
|
|
|
return M
|