4

After upgrading vim plugins. It appears that some Plugins (Ace, Gitgutter, Coc) overwrite the line numbers. The following screenshot shows the problem at line 20. A '+' has overwritten the line number instead of being placed just before it.

Do you have any idea or fix about what could cause this issue ? Sorry the question is probably not really clear. The goal is to get help pinpointing the shared component that could be responsible for the incorrect display.

vim with line numbers overwritten

Uggla
  • 51
  • 4

2 Answers2

4

I also had this issue by copy-pasting coc-nvim config.

The problem was caused by this part of the code

...
if has("nvim-0.5.0") || has("patch-8.1.1564")
  " Recently vim can merge signcolumn and number column into one
  set signcolumn=number
else
  set signcolumn=yes
endif
...

I just replaced it with

...
if has("nvim-0.5.0") || has("patch-8.1.1564")
  " Recently vim can merge signcolumn and number column into one
  set signcolumn=auto
else
  set signcolumn=auto
endif
...

And everything started to work as expected

Roman Mahotskyi
  • 4,576
  • 5
  • 35
  • 68
2

Do you have any idea or fix about what could cause this issue ?

You said it yourself:

It appears that some Plugins (Ace, Gitgutter, Coc) overwrite the line numbers.

  1. Figure out what plugin is causing the issue.
  2. Look for clues in its documentation.
  3. If you can't find anything or nothing works, use its issue tracker.
romainl
  • 186,200
  • 21
  • 280
  • 313
  • I already look for issues about this on the plugins mentioned above without success. The incorrect behavior is shared by multiple plugins. I think it is due to something else common to all these plugins. The goal of my questions is to have some guidance about what is managing the line numbers and try to report the issue to the correct owners. – Uggla Apr 02 '21 at 09:13
  • 5
    Signs and line numbers are mixed because `:help 'signcolumn'` is set to `number`. `signcolumn` is set to `number` because you explicitly, yet unwittingly, set it by copy-pasting [CoC's example config](https://github.com/neoclide/coc.nvim#example-vim-configuration) into your own config, which states the following: "Recently vim can merge signcolumn and number column into one". – romainl Apr 02 '21 at 09:34
  • you are the king ! Yes you are completely right ! This is exactly what happened. Unfortunately I did not noticed it right after doing it and I was not able to find the relation. I will write the solution unless you'd like to do it. Thank you so much. – Uggla Apr 02 '21 at 10:42