nvim-config/lua/plugins/neogit.lua

22 lines
539 B
Lua
Raw Permalink Normal View History

2023-02-10 21:20:55 -08:00
return {
"TimUntersberger/neogit",
cmd = "Neogit",
dependencies = { "sindrets/diffview.nvim" },
2023-02-11 10:37:23 -08:00
keys = {
{ "<leader>ng", "<cmd>Neogit<cr>", desc = "Neogit" },
},
2023-02-10 21:20:55 -08:00
config = function()
require("neogit").setup({
integrations = {
diffview = true,
},
})
2023-02-11 10:37:23 -08:00
local group = vim.api.nvim_create_augroup("MyCustomNeogitEvents", { clear = true })
vim.api.nvim_create_autocmd("User", {
pattern = "NeogitPushComplete",
group = group,
callback = require("neogit").close,
})
2023-02-10 21:20:55 -08:00
end,
}