Do not adjust SignColumn highlight

This was introduced in 07d7c9d4 because many colorschemes at the time
had ugly sign columns, and people kept asking how to deal with it.

These days there are many more plugins which use the sign column and
consequently more colorschemes pay attention to the SignColumn highlight
group.

Therefore it no longer makes sense for vim-gitgutter to adjust the
sign column's appearance.

To restore the previous behaviour, add this to your vimrc:

    highlight! link SignColumn LineNr

See #696.
This commit is contained in:
Andy Stewart
2020-04-30 19:31:53 +01:00
parent f458f43cf2
commit 0da302c28a
4 changed files with 19 additions and 38 deletions

View File

@@ -22,6 +22,13 @@ function! s:set(var, default) abort
endif
endfunction
function! s:obsolete(var)
if exists(a:var)
call gitgutter#utility#warn(a:var.' is obsolete and has no effect.')
endif
endfunction
call s:set('g:gitgutter_preview_win_location', 'bo')
if exists('*nvim_open_win')
call s:set('g:gitgutter_preview_win_floating', 1)
@@ -44,7 +51,7 @@ if (has('nvim-0.4.0') || exists('*sign_place')) && !exists('g:gitgutter_sign_all
let g:gitgutter_sign_allow_clobber = 1
endif
call s:set('g:gitgutter_sign_allow_clobber', 0)
call s:set('g:gitgutter_override_sign_column_highlight', 1)
call s:obsolete('g:gitgutter_override_sign_column_highlight')
call s:set('g:gitgutter_sign_added', '+')
call s:set('g:gitgutter_sign_modified', '~')
call s:set('g:gitgutter_sign_removed', '_')
@@ -90,7 +97,6 @@ if !empty(g:gitgutter_grep)
endif
endif
call gitgutter#highlight#define_sign_column_highlight()
call gitgutter#highlight#define_highlights()
call gitgutter#highlight#define_signs()
@@ -267,7 +273,7 @@ augroup gitgutter
autocmd VimResume * call gitgutter#all(1)
endif
autocmd ColorScheme * call gitgutter#highlight#define_sign_column_highlight() | call gitgutter#highlight#define_highlights()
autocmd ColorScheme * call gitgutter#highlight#define_highlights()
" Disable during :vimgrep
autocmd QuickFixCmdPre *vimgrep* let g:gitgutter_enabled = 0