---@type LazySpec return { { "lewis6991/gitsigns.nvim", event = { "BufReadPost" }, cmd = { "Gitsigns" }, keys = { { "gs", "Gitsigns", mode = "ca" }, }, dependencies = { "tpope/vim-repeat", }, opts = { signs = { add = { text = "+" }, change = { text = "~" }, delete = { text = "_" }, topdelete = { text = "‾" }, changedelete = { text = "~_" }, }, current_line_blame = true, on_attach = function(buffer) local opts = { silent = true, buffer = buffer } vim.keymap.set("n", "gg", "Gitsigns", opts) vim.keymap.set("n", "gS", "Gitsigns stage_buffer", opts) vim.keymap.set("n", "gh", "Gitsigns preview_hunk", opts) vim.keymap.set("n", "gs", "Gitsigns stage_hunk", opts) vim.keymap.set("n", "gu", "Gitsigns undo_stage_hunk", opts) vim.keymap.set("n", "gr", "Gitsigns reset_hunk", opts) vim.keymap.set("n", "gR", "Gitsigns reset_buffer", opts) -- vim.keymap.set({ "o", "x" }, "ih", "Gitsigns select_hunk", opts) vim.keymap.set("n", "gd", "Gitsigns diffthis split=rightbelow", opts) -- vim.keymap.set("n", "gm", "Gitsigns blame_line", opts) end, }, config = true, }, }