Closed chaimleib closed 5 years ago
I also tried these to remove vim-plug from the equation, and I still reproduced it:
nvim:
set nocompatible
set rtp+=~/.vim/bundle/vim-gitgutter
autocmd! bufwritepost init.vim source ~/.config/nvim/init.vim
colorscheme default "or any colorscheme
vim:
set nocompatible
set rtp+=~/.vim/bundle/vim-gitgutter
autocmd! bufwritepost .vimrc source ~/.vimrc
colorscheme default "or any colorscheme
I can't reproduce this on vim 8.1. Also with the minimal vimrc my Vim can't find the colorscheme default
.
What does :au ColorScheme
give you?
nvim:
:au ColorScheme
--- Autocommands ---
gitgutter ColorScheme
* call gitgutter#highlight#define_sign_column_highlight() | call gitgutter#highlight#def
ine_highlights()
vim 8.1:
:au ColorScheme
--- Autocommands ---
gitgutter ColorScheme
* call gitgutter#highlight#define_sign_column_highlight() | call gitgutter#highlight#def
ine_highlights()
It doesn't change after :w
.
I found this in the help:
:colo[rscheme] Output the name of the currently active color scheme.
This is basically the same as
:echo g:colors_name
In case g:colors_name has not been defined :colo will
output "default". When compiled without the +eval
feature it will output "unknown".
:colo[rscheme] {name} Load color scheme {name}. This searches 'runtimepath'
for the file "colors/{name}.vim". The first one that
is found is loaded.
Also searches all plugins in 'packpath', first below
"start" and then under "opt".
The default vim from brew is compiled with +eval
.
I checked the runtimepath and packpath, too.
vim 8.1:
:colo
default
:set runtimepath?
runtimepath=~/.vim,/usr/local/share/vim/vimfiles,/usr/local/share/vim/vim81,/usr/local/share/vim/v
imfiles/after,~/.vim/after,~/.vim/bundle/vim-gitgutter
:set packpath?
packpath=~/.vim,/usr/local/share/vim/vimfiles,/usr/local/share/vim/vim81,/usr/local/share/vim/vimf
iles/after,~/.vim/after
nvim:
:colo
default
:set runtimepath?
runtimepath=~/.config/nvim,/etc/xdg/nvim,~/.local/share/nvim/site,/usr/local/share/nvim/site,/usr/
share/nvim/site,/usr/local/Cellar/neovim/0.3.4/share/nvim/runtime,/usr/share/nvim/site/after,/usr/lo
cal/share/nvim/site/after,~/.local/share/nvim/site/after,/etc/xdg/nvim/after,~/.config/nvim/after,~/
.vim/bundle/vim-gitgutter
:set packpath?
packpath=~/.config/nvim,/etc/xdg/nvim,~/.local/share/nvim/site,/usr/local/share/nvim/site,/usr/sha
re/nvim/site,/usr/local/Cellar/neovim/0.3.4/share/nvim/runtime,/usr/share/nvim/site/after,/usr/local
/share/nvim/site/after,~/.local/share/nvim/site/after,/etc/xdg/nvim/after,~/.config/nvim/after
These also don't change after :w
.
I did an ls
on all the runtimepaths. This is a superset of everything in the packpath.
vim 8.1:
$ ls ~/.vim,/usr/local/share/vim/vimfiles
ls: /Users/chalbert/.vim,/usr/local/share/vim/vimfiles: No such file or directory
$ ls /usr/local/share/vim/vim81
autoload evim.vim indent mswin.vim spell
bugreport.vim filetype.vim indent.vim optwin.vim synmenu.vim
colors ftoff.vim indoff.vim pack syntax
compiler ftplugin keymap plugin tools
defaults.vim ftplugin.vim lang print tutor
delmenu.vim ftplugof.vim macros rgb.txt vimrc_example.vim
doc gvimrc_example.vim menu.vim scripts.vim
$ ls /usr/local/share/vim/vim81/colors # not in rtp, but interesting
README.txt default.vim elflord.vim koehler.vim pablo.vim shine.vim torte.vim
blue.vim delek.vim evening.vim morning.vim peachpuff.vim slate.vim zellner.vim
darkblue.vim desert.vim industry.vim murphy.vim ron.vim tools
$ ls /usr/local/share/vim/vimfiles/after
ls: /usr/local/share/vim/vimfiles/after: No such file or directory
$ ls ~/.vim/after
ls: /Users/chalbert/.vim/after: No such file or directory
$ ls ~/.vim/bundle/vim-gitgutter
LICENCE autoload plugin test
README.mkd doc screenshot.png unplace.vim
nvim:
$ ls /Users/chalbert/.config/nvim
autoload init.vim plugged
$ ls /etc/xdg/nvim
ls: /etc/xdg/nvim: No such file or directory
$ ls /Users/chalbert/.local/share/nvim/site
ls: /Users/chalbert/.local/share/nvim/site: No such file or directory
$ ls /usr/local/share/nvim/site
ls: /usr/local/share/nvim/site: No such file or directory
$ ls /usr/share/nvim/site
ls: /usr/share/nvim/site: No such file or directory
$ ls /usr/local/Cellar/neovim/0.3.4/share/nvim/runtime
autoload doc ftplugof.vim lua mswin.vim rgb.txt tools
bugreport.vim filetype.vim indent macmap.vim optwin.vim scripts.vim tutor
colors ftoff.vim indent.vim macros pack spell
compiler ftplugin indoff.vim makemenu.vim plugin synmenu.vim
delmenu.vim ftplugin.vim keymap menu.vim print syntax
$ ls /usr/local/Cellar/neovim/0.3.4/share/nvim/runtime/colors # not in rtp, but interesting
blue.vim delek.vim evening.vim morning.vim peachpuff.vim slate.vim
darkblue.vim desert.vim industry.vim murphy.vim ron.vim torte.vim
default.vim elflord.vim koehler.vim pablo.vim shine.vim zellner.vim
$ ls /usr/share/nvim/site/after
ls: /usr/share/nvim/site/after: No such file or directory
$ ls /usr/local/share/nvim/site/after
ls: /usr/local/share/nvim/site/after: No such file or directory
$ ls /Users/chalbert/.local/share/nvim/site/after
ls: /Users/chalbert/.local/share/nvim/site/after: No such file or directory
$ ls /etc/xdg/nvim/after
ls: /etc/xdg/nvim/after: No such file or directory
$ ls /Users/chalbert/.config/nvim/after
ls: /Users/chalbert/.config/nvim/after: No such file or directory
$ ls /Users/chalbert/.vim/bundle/vim-gitgutter
LICENCE autoload plugin test
README.mkd doc screenshot.png unplace.vim
You didn't explicitly say this but I assume the problem only occurs when you're editing your init.vim
/ vimrc
?
Does it still occur if you remove the colorscheme default
line?
Yes, I have to be in that buffer, writing the init.vim
/.vimrc
file. I don't need to change anything, just to save it again. That's enough to trigger bufwritepost
.
If I remove the colorscheme
line, there are no gutter glitches when I save.
The colorscheme
line loads your default
colorscheme, which presumably resets all the highlight groups. Then vim-gitgutter's ColorScheme
autocommand fires and sets up gitgutter's highlights and colours.
I don't know why it's glitching for you. I still can't reproduce the problem.
can reproduce in neovim but not in vim by doing nvim -u example.vim
" contents of example.vim
set rtp+=~/.vim/bundle/vim-gitgutter
set signcolumn=yes
i don't know why but this fixes it
let g:gitgutter_override_sign_column_highlight = 0
I can no longer reproduce the issue.
7eeea63
nvim v0.3.4 vim v8.0 vim v8.1
Signs are showing, but
.config/nvim/init.vim
Not applicable, but no
To reproduce
call plug#begin('~/.config/nvim/plugged') Plug 'airblade/vim-gitgutter' call plug#end()
autocmd! bufwritepost init.vim source ~/.config/nvim/init.vim colorscheme default "or any colorscheme
:w
.What happens
A grey bar appears in the gutter wherever there isn't a mark.
Expected
No changes to the UI. The gutter should remain transparent.