nvim: Use gitsigns
Currently there is an observable bug where this doesn't play well with gina buffers. Perhaps it should be disabled for any gina buffers or something similar.
This commit is contained in:
parent
d0687b7f1a
commit
21167993bf
3 changed files with 22 additions and 0 deletions
|
@ -113,6 +113,7 @@ require 'modules.diagnostic'
|
||||||
require 'modules.floaterm'
|
require 'modules.floaterm'
|
||||||
require 'modules.fzf'
|
require 'modules.fzf'
|
||||||
require 'modules.fzf-preview'
|
require 'modules.fzf-preview'
|
||||||
|
require 'modules.gitsigns'
|
||||||
require 'modules.sneak'
|
require 'modules.sneak'
|
||||||
require 'modules.togglelist'
|
require 'modules.togglelist'
|
||||||
require 'modules.which_key'
|
require 'modules.which_key'
|
||||||
|
|
19
nvim/.config/nvim/lua/modules/gitsigns.lua
Normal file
19
nvim/.config/nvim/lua/modules/gitsigns.lua
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
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 = '~'},
|
||||||
|
},
|
||||||
|
keymaps = {
|
||||||
|
[']c'] = '<cmd>lua require("gitsigns").next_hunk()<CR>',
|
||||||
|
['[c'] = '<cmd>lua require("gitsigns").prev_hunk()<CR>',
|
||||||
|
['ghs'] = '<cmd>lua require("gitsigns").stage_hunk()<CR>',
|
||||||
|
['ghu'] = '<cmd>lua require("gitsigns").undo_stage_hunk()<CR>',
|
||||||
|
['ghr'] = '<cmd>lua require("gitsigns").reset_hunk()<CR>',
|
||||||
|
},
|
||||||
|
watch_index = {
|
||||||
|
interval = 1000
|
||||||
|
}
|
||||||
|
}
|
|
@ -20,6 +20,8 @@ paq 'steelsojka/completion-buffers'
|
||||||
-- For tmux
|
-- For tmux
|
||||||
paq 'tmux-plugins/vim-tmux-focus-events'
|
paq 'tmux-plugins/vim-tmux-focus-events'
|
||||||
-- Git support
|
-- Git support
|
||||||
|
paq 'nvim-lua/plenary.nvim'
|
||||||
|
paq 'lewis6991/gitsigns.nvim'
|
||||||
paq 'lambdalisue/gina.vim'
|
paq 'lambdalisue/gina.vim'
|
||||||
paq 'rhysd/git-messenger.vim'
|
paq 'rhysd/git-messenger.vim'
|
||||||
paq 'rhysd/conflict-marker.vim'
|
paq 'rhysd/conflict-marker.vim'
|
||||||
|
|
Loading…
Reference in a new issue