增删一些插件

This commit is contained in:
captain 2026-02-27 19:13:55 +08:00
parent e4487aa27f
commit 996cfc643b
9 changed files with 145 additions and 46 deletions

View file

@ -6,6 +6,25 @@ return {
'lewis6991/gitsigns.nvim',
build = ':TSUpdate',
config = function()
require('gitsigns').setup()
require('gitsigns').setup {
on_attach = function(bufnr)
local gitsigns = require('gitsigns')
local function map(mode, l, r, opts)
opts = opts or {}
opts.buffer = bufnr
vim.keymap.set(mode, l, r, opts)
end
-- Navigation
map('n', 't=', function()
gitsigns.nav_hunk('next')
end)
map('n', 't-', function()
gitsigns.nav_hunk('prev')
end)
-- show diff
map('n', '<leader>hd', gitsigns.diffthis)
end
}
end
}