all repos

init.lua @ ec13226

my nvim config

init.lua/lua/plugins/git.lua(view raw)

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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---@type LazySpec[]
return {
  {
    "lewis6991/gitsigns.nvim",
    event = "BufRead",
    keys = function()
      --stylua: ignore
      return {
        { "]g", function() require("gitsigns").next_hunk() end },
        { "[g", function() require("gitsigns").prev_hunk() end},
        { "<leader>gs", function() require("gitsigns").stage_hunk() end},
        { "<leader>gS", function() require("gitsigns").undo_stage_hunk() end },
        { "<leader>gr", function() require("gitsigns").reset_hunk() end },
        { "<leader>gh", function() require("gitsigns").preview_hunk() end },
      }
    end,
    opts = {
      max_file_length = 1000,
      current_line_blame = true,
      signs = {
        add = { text = "" },
        change = { text = "" },
        delete = { text = "" },
        topdelete = { text = "" },
        changedelete = { text = "" },
        untracked = { text = "" },
      },
      current_line_blame_opts = {
        virt_text_pos = "eol",
        delay = 300,
      },
    },
  },

  {
    "TimUntersberger/neogit",
    cmd = "Neogit",
    keys = { { "<leader>gg", vim.cmd.Neogit } },
    ---@type NeogitConfig
    opts = {
      kind = "vsplit",
      disable_builtin_notifications = true,
      disable_commit_confirmation = true,
      disable_context_highlighting = true,
      disable_hint = true,
      signs = {
        section = { "", "" },
        item = { "", "" },
        hunk = { "", "" },
      },
      commit_editor = { kind = "split", staged_diff_split_kind = "split_above" },
      integrations = { telescope = true },
    },
  },
}