mirror of
https://github.com/cap153/nvim.git
synced 2026-05-02 19:58:10 +08:00
增删一些插件
This commit is contained in:
parent
e4487aa27f
commit
996cfc643b
9 changed files with 145 additions and 46 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue