Closed royyhlee closed 4 years ago
I can't reproduce this, please provide:
:hi SignColumn
when using minimal vimrc. This is what I have:
Your vim version neovim v0.4.3
Minimal vimrc
call plug#begin() Plug 'airblade/vim-gitgutter' Plug 'tpope/vim-commentary' Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'junegunn/fzf.vim' Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'sheerun/vim-polyglot' Plug 'sainnhe/edge' call plug#end()
if has("termguicolors") set termguicolors endif
set background=light let g:lightline = { 'colorscheme': 'edge' } let g:edge_disable_italic_comment = 1 colo edge
set number set tw=80 set cc=+1 set hidden set tabstop=2 set shiftwidth=2 set updatetime=100 set expandtab set si set ignorecase set smartcase set lazyredraw set showmatch
filetype plugin on filetype indent on
3. The output of `:hi SignColumn` when using minimal vimrc.
:hi SignColumn
SignColumn xxx ctermfg=4 ctermbg=248 guifg=#4b505b guibg=#eef1f4
links to LineNr
The problem is that SignColumn
has been linked to LineNr
which is not expected, the expected output should be:
:hi SignColumn
SignColumn xxx ctermfg=4 ctermbg=248 guifg=#4b505b guibg=#eef1f4
This is caused by
Plug 'airblade/vim-gitgutter'
So it's not an issue of this color scheme, it's an issue of gitgutter. I don't understand why the author of gitgutter links SignColumn
to LineNr
.
To solve this problem, you can
Awesome, thank you for the info. I'll look more into it.
Actually the SignColumn is fine: the problem is with the background colour of the signs.
I don't understand why the author of gitgutter links
SignColumn
toLineNr
.
vim-gitgutter defaults to linking SignColumn
to LineNr
because colour schemes often define them with different background colours, and lots of people opened issues wanting them to look the same. (The code is here.) Note that you can opt out of this.
Anyway, you can see that the resulting values for ctermfg, ctermbg, guifg, and guibg are all as expected.
As for why the signs' background colours are wrong – I will look into this further at airblade/vim-gitgutter#696.
Sorry, I misunderstood the colorscheme: I thought the sign column was supposed to be white, not grey; i.e. that the sign backgrounds were wrong, not the sign column.
As @sainnhe said, the problem was vim-gitgutter linking SignColumn
to LineNr
. This was put in 5 years ago when few plugins used signs and therefore most colorschemes at the time had ugly sign columns. Now the situation has changed – there are many plugins using signs and many carefully designed colorschemes – so it makes sense for vim-gitgutter not to adjust the SignColumn
any more (https://github.com/airblade/vim-gitgutter/commit/0da302c28a08fe62c31c77ac854914affd2180b8).
My signcolumn doesn't look correct. Is there a way to fix this? Thanks!