summaryrefslogtreecommitdiff
path: root/neovim/.config/nvim/lua/plugins/neogit.lua
blob: a0a3f90d661e002cef23dede6749b882e9daeb00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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' },
    },
  },
}