chore: replaced gitsigns with minidiff 0149bf3f
Steve · 2025-08-18 19:22 4 file(s) · +102 −70
nvim/lazy-lock.json +1 −4
1 1
{
2 -
  "ansi-nvim": { "branch": "main", "commit": "5aa5aec11c2f269d6a6b107049d71153c3ecfb4f" },
2 +
  "ansi-nvim": { "branch": "main", "commit": "8d0078f63d161de882bca21a505f84ee442fa194" },
3 3
  "gitsigns.nvim": { "branch": "main", "commit": "6e3c66548035e50db7bd8e360a29aec6620c3641" },
4 -
  "hardtime.nvim": { "branch": "main", "commit": "6d7664d5bdfaea44c5f50b29f5239fab7b00c273" },
5 4
  "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
6 5
  "mini.nvim": { "branch": "main", "commit": "94cae4660a8b2d95dbbd56e1fbc6fcfa2716d152" },
7 -
  "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
8 6
  "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
9 7
  "nvim-treesitter-textobjects": { "branch": "master", "commit": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c" },
10 -
  "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
11 8
  "vim-tmux-navigator": { "branch": "master", "commit": "c45243dc1f32ac6bcf6068e5300f3b2b237e576a" }
12 9
}
nvim/lua/config/keymaps.lua +1 −0
58 58
map("n", "<leader>c", ":bd<cr>", opts)
59 59
60 60
map("n", "<leader>dd", "<cmd>lua vim.diagnostic.open_float({ border = 'rounded' })<CR>", opts)
61 +
map("n", "<leader>gg", "<cmd>lua MiniDiff.toggle_overlay()<CR>", opts)
61 62
62 63
map("i", "<C-j>", 'pumvisible() ? "\\<C-n>" : "\\<C-j>"', { expr = true, noremap = true, silent = true })
63 64
map("i", "<C-k>", 'pumvisible() ? "\\<C-p>" : "\\<C-k>"', { expr = true, noremap = true, silent = true })
nvim/lua/plugins/gitsigns.lua (deleted) +0 −15
1 -
return {
2 -
    "lewis6991/gitsigns.nvim",
3 -
    config = function()
4 -
        require("gitsigns").setup({
5 -
            signs = {
6 -
                add = { text = "+" },
7 -
                change = { text = "~" },
8 -
                delete = { text = "-" },
9 -
                topdelete = { text = "" },
10 -
                changedelete = { text = "▎" },
11 -
                untracked = { text = "+" },
12 -
            },
13 -
        })
14 -
    end,
15 -
}
nvim/lua/plugins/mini.lua +100 −51
1 1
return {
2 -
    'echasnovski/mini.nvim',
3 -
    version = '*',
4 -
    config = function()
5 -
        local win_config = function()
6 -
            local height = math.floor(0.618 * vim.o.lines)
7 -
            local width = math.floor(0.618 * vim.o.columns)
8 -
            return {
9 -
                anchor = 'NW',
10 -
                height = height,
11 -
                width = width,
12 -
                row = math.floor(0.5 * (vim.o.lines - height)),
13 -
                col = math.floor(0.5 * (vim.o.columns - width)),
14 -
            }
15 -
        end
16 -
        require("mini.pick").setup({
17 -
            mappings = {
18 -
                move_down = '<C-j>',
19 -
                move_up   = '<C-k>',
20 -
            },
21 -
            window = { config = win_config }
22 -
        })
2 +
  'echasnovski/mini.nvim',
3 +
  version = '*',
4 +
  config = function()
5 +
    local win_config = function()
6 +
      local height = math.floor(0.618 * vim.o.lines)
7 +
      local width = math.floor(0.618 * vim.o.columns)
8 +
      return {
9 +
        anchor = 'NW',
10 +
        height = height,
11 +
        width = width,
12 +
        row = math.floor(0.5 * (vim.o.lines - height)),
13 +
        col = math.floor(0.5 * (vim.o.columns - width)),
14 +
      }
15 +
    end
16 +
    require("mini.pick").setup({
17 +
      mappings = {
18 +
        move_down = '<C-j>',
19 +
        move_up   = '<C-k>',
20 +
      },
21 +
      window = { config = win_config }
22 +
    })
23 +
24 +
    vim.api.nvim_set_hl(0, "MiniPickMatchCurrent", {
25 +
      bg = vim.g.terminal_color_8
26 +
    })
27 +
28 +
    require("mini.comment").setup({
29 +
      mappings = {
30 +
        comment = 'gb',
31 +
        comment_visual = 'gb',
32 +
        textobject = 'gb'
33 +
      }
34 +
    })
35 +
36 +
    require("mini.completion").setup({
37 +
      mappings = {
38 +
        scroll_down = '<C-j>',
39 +
        scroll_up = '<C-k>',
40 +
      },
41 +
    })
42 +
43 +
    require('mini.files').setup({
44 +
      mappings = {
45 +
        close      = '<ESC>',
46 +
        go_in_plus = '<CR>'
47 +
      }
48 +
    })
49 +
50 +
    require('mini.surround').setup({
51 +
      mappings = {
52 +
        replace = 'cs', -- Replace surrounding
53 +
      },
54 +
    })
55 +
    require('mini.diff').setup({
56 +
      view = {
57 +
        -- Visualization style. Possible values are 'sign' and 'number'.
58 +
        -- Default: 'number' if line numbers are enabled, 'sign' otherwise.
59 +
        -- Suppress vim.tbl_islist deprecation warning
60 +
        style = vim.go.number and 'sign' or 'number',
61 +
62 +
        -- Signs used for hunks with 'sign' view
63 +
        signs = {
64 +
          add = "+",
65 +
          change = "~",
66 +
          delete = "-",
67 +
          topdelete = "",
68 +
          changedelete = "▎",
69 +
          untracked = "+"
70 +
        },
71 +
72 +
        priority = 199,
73 +
      },
74 +
75 +
      delay = {
76 +
        text_change = 200,
77 +
      },
23 78
24 -
        vim.api.nvim_set_hl(0, "MiniPickMatchCurrent", {
25 -
            bg = vim.g.terminal_color_8
26 -
        })
79 +
      mappings = {
80 +
        -- Apply hunks inside a visual/operator region
81 +
        apply = 'gh',
27 82
28 -
        require("mini.comment").setup({
29 -
            mappings = {
30 -
                comment = 'gb',
31 -
                comment_visual = 'gb',
32 -
                textobject = 'gb'
33 -
            }
34 -
        })
83 +
        -- Reset hunks inside a visual/operator region
84 +
        reset = 'gH',
35 85
36 -
        require("mini.completion").setup({
37 -
            mappings = {
38 -
                scroll_down = '<C-j>',
39 -
                scroll_up = '<C-k>',
40 -
            },
41 -
        })
86 +
        -- Hunk range textobject to be used inside operator
87 +
        -- Works also in Visual mode if mapping differs from apply and reset
88 +
        textobject = 'gh',
42 89
43 -
        require('mini.files').setup({
44 -
            mappings = {
45 -
                close      = '<ESC>',
46 -
                go_in_plus = '<CR>'
47 -
            }
48 -
        })
90 +
        -- Go to hunk range in corresponding direction
91 +
        goto_first = '[H',
92 +
        goto_prev = '[h',
93 +
        goto_next = ']h',
94 +
        goto_last = ']H',
95 +
      },
49 96
50 -
        require('mini.surround').setup({
51 -
            mappings = {
52 -
                replace = 'cs', -- Replace surrounding
53 -
            },
54 -
        })
55 -
        require('mini.statusline').setup()
56 -
        require('mini.extra').setup()
57 -
    end
97 +
      options = {
98 +
        algorithm = 'histogram',
99 +
        indent_heuristic = true,
100 +
        linematch = 60,
101 +
        wrap_goto = false,
102 +
      },
103 +
    })
104 +
    require('mini.statusline').setup()
105 +
    require('mini.extra').setup()
106 +
  end
58 107
}