Skip to content

Commit

Permalink
gitgutter -> gitsigns
Browse files Browse the repository at this point in the history
  • Loading branch information
theniceboy committed Nov 24, 2022
1 parent 4239689 commit f9aa213
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ Plug 'mbbill/undotree'
Plug 'theniceboy/vim-gitignore', { 'for': ['gitignore', 'vim-plug'] }
Plug 'theniceboy/fzf-gitignore', { 'do': ':UpdateRemotePlugins' }
"Plug 'mhinz/vim-signify'
Plug 'airblade/vim-gitgutter'
Plug 'lewis6991/gitsigns.nvim'
Plug 'cohama/agit.vim'
Plug 'kdheepak/lazygit.nvim'

Expand Down Expand Up @@ -504,21 +504,24 @@ hi NonText ctermfg=gray guifg=grey10
let g:airline_powerline_fonts = 0


" ==================== GitGutter ====================
" let g:gitgutter_signs = 0
let g:gitgutter_sign_allow_clobber = 0
let g:gitgutter_map_keys = 0
let g:gitgutter_override_sign_column_highlight = 0
let g:gitgutter_preview_win_floating = 1
let g:gitgutter_sign_added = ''
let g:gitgutter_sign_modified = ''
let g:gitgutter_sign_removed = ''
let g:gitgutter_sign_removed_first_line = ''
let g:gitgutter_sign_modified_removed = ''
nnoremap <LEADER>gf :GitGutterFold<CR>
nnoremap H :GitGutterPreviewHunk<CR>
nnoremap <LEADER>g- :GitGutterPrevHunk<CR>
nnoremap <LEADER>g= :GitGutterNextHunk<CR>
" ==================== gitsigns.nvim ====================
lua <<EOF
require('gitsigns').setup({
signs = {
add = { hl = 'GitSignsAdd' , text = '', numhl='GitSignsAddNr' , linehl='GitSignsAddLn' },
change = { hl = 'GitSignsChange', text = '', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn' },
delete = { hl = 'GitSignsDelete', text = '_', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn' },
topdelete = { hl = 'GitSignsDelete', text = '', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn' },
changedelete = { hl = 'GitSignsChange', text = '', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn' },
untracked = { hl = 'GitSignsAdd' , text = '', numhl='GitSignsAddNr' , linehl='GitSignsAddLn' },
},
})
EOF
nnoremap H :Gitsigns preview_hunk_inline<CR>
nnoremap <LEADER>gr :Gitsigns reset_hunk<CR>
nnoremap <LEADER>gb :Gitsigns blame_line<CR>
nnoremap <LEADER>g- :Gitsigns prev_hunk<CR>
nnoremap <LEADER>g= :Gitsigns next_hunk<CR>

" ==================== coc.nvim ====================
Expand Down Expand Up @@ -997,7 +1000,10 @@ require("scrollbar").setup({
Misc = { color = "purple" },
},
handlers = {
cursor = true,
diagnostic = true,
gitsigns = true,
handle = true,
search = true,
},
})
Expand Down

0 comments on commit f9aa213

Please sign in to comment.