hunks: add support for gitsigns.nvim

Refactor s:get_hunks_coc() so that parsing the hunk status can be reused
by s:get_hunks_gitsigns().

Reorder s:get_hunks_coc() for consistent ordering with related code.

Give gitsigns.nvim priority over coc-git when selecting b:source_func in
hunks#get_raw_hunks().
This commit is contained in:
Simon Truscott
2023-01-01 10:41:24 +11:00
parent 9e2d021fc6
commit 46f0a12bae
4 changed files with 31 additions and 14 deletions

View File

@@ -234,6 +234,7 @@ function! airline#extensions#load()
\ || exists('g:loaded_gitgutter')
\ || exists('g:loaded_changes')
\ || exists('g:loaded_quickfixsigns')
\ || exists(':Gitsigns')
\ || exists(':CocCommand'))
call airline#extensions#hunks#init(s:ext)
call add(s:loaded_ext, 'hunks')