summaryrefslogtreecommitdiff
path: root/neovim/.config/nvim/lua/plugins/neogit.lua
diff options
context:
space:
mode:
authorMichaël Ball <michael.ball@krotosaudio.com>2024-07-18 09:07:05 +0100
committerMichaël Ball <michael.ball@krotosaudio.com>2024-07-18 09:07:05 +0100
commit457ce9e6017c081e02a566895fa1fe488cd87b9c (patch)
tree05f49a483fe99c9935f43e8e4c25f80ba5077452 /neovim/.config/nvim/lua/plugins/neogit.lua
parent4c2a7cc1b0fa0e437476e06c1c11e1778d9cc92f (diff)
Refactor plugins for lazy.nvim
Diffstat (limited to 'neovim/.config/nvim/lua/plugins/neogit.lua')
-rw-r--r--neovim/.config/nvim/lua/plugins/neogit.lua36
1 files changed, 36 insertions, 0 deletions
diff --git a/neovim/.config/nvim/lua/plugins/neogit.lua b/neovim/.config/nvim/lua/plugins/neogit.lua
new file mode 100644
index 0000000..a0a3f90
--- /dev/null
+++ b/neovim/.config/nvim/lua/plugins/neogit.lua
@@ -0,0 +1,36 @@
+return {
+ {
+ 'NeogitOrg/neogit',
+ cmd = 'Neogit',
+ dependencies = {
+ 'nvim-lua/plenary.nvim',
+ 'sindrets/diffview.nvim',
+ },
+ opts = {
+ disable_commit_confirmation = true,
+ auto_refresh = true,
+ kind = 'tab',
+ commit_editor = {
+ kind = 'auto',
+ },
+ integrations = {
+ -- Neogit only provides inline diffs. If you want a more traditional way to look at diffs, you can use `sindrets/diffview.nvim`.
+ -- The diffview integration enables the diff popup, which is a wrapper around `sindrets/diffview.nvim`.
+ --
+ -- Requires you to have `sindrets/diffview.nvim` installed.
+ -- use {
+ -- 'TimUntersberger/neogit',
+ -- requires = {
+ -- 'nvim-lua/plenary.nvim',
+ -- 'sindrets/diffview.nvim'
+ -- }
+ -- }
+ --
+ diffview = true
+ }
+ },
+ keys = {
+ { '<leader>g', '<cmd>Neogit<CR>', desc = 'Neogit toggle' },
+ },
+ },
+}