chore(nvim): switch lewis6991/gitsigns.nvim
parent
0d4b7c90f6
commit
c2f57b2b18
|
@ -165,8 +165,44 @@ require("lazy").setup({
|
|||
end,
|
||||
},
|
||||
|
||||
-- https://github.com/airblade/vim-gitgutter
|
||||
"airblade/vim-gitgutter",
|
||||
-- https://github.com/lewis6991/gitsigns.nvim
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = function()
|
||||
require("gitsigns").setup({
|
||||
on_attach = function(bufnr)
|
||||
local gs = package.loaded.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", "]c", function()
|
||||
if vim.wo.diff then
|
||||
return "]c"
|
||||
end
|
||||
vim.schedule(function()
|
||||
gs.next_hunk()
|
||||
end)
|
||||
return "<Ignore>"
|
||||
end, { expr = true })
|
||||
|
||||
map("n", "[c", function()
|
||||
if vim.wo.diff then
|
||||
return "[c"
|
||||
end
|
||||
vim.schedule(function()
|
||||
gs.prev_hunk()
|
||||
end)
|
||||
return "<Ignore>"
|
||||
end, { expr = true })
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- https://github.com/echasnovski/mini.nvim
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue