nvim: Switch back to vim-signify

vim-signify recently fixed the below issue which was a problem earlier.
https://github.com/mhinz/vim-signify/issues/345

Considering that gitsigns exhibits a problem where the complete sign
column is marked while in the middle of a rebase, switch back to using
signify.
This commit is contained in:
Sanchayan Maity 2021-01-26 19:41:26 +05:30
parent 7ebc88268b
commit a0739c3ef9
3 changed files with 14 additions and 33 deletions

View file

@ -1,30 +0,0 @@
require('gitsigns').setup {
signs = {
add = {hl = 'DiffAdd' , text = '+'},
change = {hl = 'DiffChange', text = '!'},
delete = {hl = 'DiffDelete', text = 'x'},
topdelete = {hl = 'DiffDelete', text = '-'},
changedelete = {hl = 'DiffChange', text = '~'},
},
numhl = false,
keymaps = {
noremap = true,
buffer = true,
['n ]c'] = { expr = true, "&diff ? ']c' : '<cmd>lua require\"gitsigns\".next_hunk()<CR>'"},
['n [c'] = { expr = true, "&diff ? '[c' : '<cmd>lua require\"gitsigns\".prev_hunk()<CR>'"},
['n ghs'] = '<cmd>lua require"gitsigns".stage_hunk()<CR>',
['n ghu'] = '<cmd>lua require"gitsigns".undo_stage_hunk()<CR>',
['n ghr'] = '<cmd>lua require"gitsigns".reset_hunk()<CR>',
['n ghp'] = '<cmd>lua require"gitsigns".preview_hunk()<CR>',
['n ghb'] = '<cmd>lua require"gitsigns".blame_line()<CR>',
['o ih'] = ':<C-U>lua require"gitsigns".text_object()<CR>',
['x ih'] = ':<C-U>lua require"gitsigns".text_object()<CR>'
},
watch_index = {
interval = 1000
},
sign_priority = 6,
status_formatter = nil,
}

View file

@ -0,0 +1,12 @@
local remap = vim.api.nvim_set_keymap
remap('n', 'ghr', ':SignifyHunkUndo<CR>', { noremap = true })
remap('n', 'ghp', ':SignifyHunkDiff<CR>', { noremap = true })
remap('n', ']c', '<Plug>(signify-next-hunk)', { noremap = false })
remap('n', '[c', '<Plug>(signify-prev-hunk)', { noremap = false })
remap('n', ']C', '9999]c', { noremap = false })
remap('n', '[C', '9999[c', { noremap = false })
remap('o', 'ih', '<Plug>(signify-motion-inner-pending)', { noremap = false })
remap('x', 'ih', '<Plug>(signify-motion-inner-visual)', { noremap = false })
remap('o', 'ah', '<Plug>(signify-motion-outer-pending)', { noremap = false })
remap('x', 'ah', '<Plug>(signify-motion-outer-visual)', { noremap = false })

View file

@ -41,10 +41,9 @@ local init = function ()
-- For tmux -- For tmux
use 'tmux-plugins/vim-tmux-focus-events' use 'tmux-plugins/vim-tmux-focus-events'
-- Git support -- Git support
use 'nvim-lua/plenary.nvim'
use { use {
'lewis6991/gitsigns.nvim', 'mhinz/vim-signify',
config = "require('modules.gitsigns')" config = "require('modules.signify')"
} }
use 'lambdalisue/gina.vim' use 'lambdalisue/gina.vim'
use 'rhysd/git-messenger.vim' use 'rhysd/git-messenger.vim'