nvim: plugins: Drop gitsigns

This commit is contained in:
Sanchayan Maity 2024-03-31 16:29:50 +05:30
parent 703d23c76e
commit 767ae28f4f
Signed by: sanchayanmaity
GPG key ID: 6F6A0609C12038F3
2 changed files with 0 additions and 67 deletions

View file

@ -1,66 +0,0 @@
require('gitsigns').setup {
status_formatter = nil,
sign_priority = 6,
update_debounce = 100,
max_file_length = 10000,
signcolumn = true,
numhl = false,
linehl = false,
word_diff = false,
attach_to_untracked = false,
current_line_blame = false,
watch_gitdir = {
follow_files = true
},
preview_config = {
-- Options passed to nvim_open_win
border = 'single',
style = 'minimal',
relative = 'cursor',
row = 0,
col = 1
},
yadm = {
enable = false
},
signs = {
add = { text = '+' },
change = { text = '' },
delete = { text = '-' },
topdelete = { text = '' },
changedelete = { text = '~' },
},
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
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})
map('n', '<Leader>hp', gs.preview_hunk)
map('n', '<Leader>hP', gs.preview_hunk_inline)
map('n', '<Leader>hl', gs.setloclist)
map('n', '<Leader>hq', gs.setqflist)
map('n', '<Leader>hQ', function() gs.setqflist('attached') end)
map('n', '<Leader>ht', gs.toggle_signs)
map('n', '<Leader>hu', gs.undo_stage_hunk)
map({'n', 'v'}, '<Leader>hs', ':Gitsigns stage_hunk<CR>')
map({'n', 'v'}, '<Leader>hr', ':Gitsigns reset_hunk<CR>')
map({'o', 'x'}, 'ih', ':<C-U>Gitsigns select_hunk<CR>')
end
}

View file

@ -10,7 +10,6 @@ require "paq" {
'dcampos/nvim-snippy' , 'dcampos/nvim-snippy' ,
'honza/vim-snippets' , 'honza/vim-snippets' ,
-- Git -- Git
'lewis6991/gitsigns.nvim' ,
'tpope/vim-fugitive' , 'tpope/vim-fugitive' ,
'SanchayanMaity/gitlinker.nvim' , 'SanchayanMaity/gitlinker.nvim' ,
-- Quickfix -- Quickfix