Giter Club home page Giter Club logo

Comments (6)

sainnhe avatar sainnhe commented on July 18, 2024 1

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

  1. Open an issue in airblade/vim-gitgutter
  2. Use other plugin instead, for example: mhinz/vim-signify, neoclide/coc-git

from edge.

sainnhe avatar sainnhe commented on July 18, 2024

I can't reproduce this, please provide:

  1. Your vim version.
  2. Minimal vimrc.
  3. The output of :hi SignColumn when using minimal vimrc.

from edge.

royyhlee avatar royyhlee commented on July 18, 2024

This is what I have:

  1. Your vim version
    neovim v0.4.3

  2. 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


  1. The output of :hi SignColumn when using minimal vimrc.
:hi SignColumn                                                                                                                                                                                  
SignColumn     xxx ctermfg=4 ctermbg=248 guifg=#4b505b guibg=#eef1f4                                                                                                                            
                   links to LineNr  

from edge.

royyhlee avatar royyhlee commented on July 18, 2024

Awesome, thank you for the info. I'll look more into it.

from edge.

airblade avatar airblade commented on July 18, 2024

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 to LineNr.

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.

from edge.

airblade avatar airblade commented on July 18, 2024

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 (airblade/vim-gitgutter@0da302c).

from edge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.