airblade / vim-gitgutter

A Vim plugin which shows git diff markers in the sign column and stages/previews/undoes hunks and partial hunks.
MIT License
8.35k stars 296 forks source link

vim-gitgutter: exceeded maximum number of signs (0 > -1, configured by g:gitgutter_max_signs). #705

Closed sacsar closed 4 years ago

sacsar commented 4 years ago

What is the latest commit SHA in your installed vim-gitgutter? b356cc9

What vim/nvim version are you on? 0.4.3

I don't have any additional configuration of git-gutter, just loading it with vim-plug. However, it looks like -1 is not actually treated as a special value, so I get this message whenever I open a file with changes (the gutter does not open):

vim-gitgutter: exceeded maximum number of signs (0 > -1, configured by g:gitgutter_max_signs).
airblade commented 4 years ago

The max-signs check is here:

https://github.com/airblade/vim-gitgutter/blob/b356cc9a7da08ebeb919cd04b2831dad71a34d38/autoload/gitgutter/diff.vim#L185

As you're on Neovim 0.4.3 your g:gitgutter_max_signs will have been set to -1.

I must be missing something because I can't see how this check would go wrong.

sacsar commented 4 years ago

I think this has to be user error (or a conflicting plugin). I just added vim-gitgutter to my setup on a different computer (same nvim and vim-gitgutter versions, but OS X rather than Manjaro) and I don't get the error message. I'll have to compare the two later.

sacsar commented 4 years ago

Coming back to this having rebooted Manjaro, I can no longer replicate. Going to close this, sorry for the bother.