10

There a number of types of plugins use the Vim gutter to display Git status, syntax correctness, linting and code formatting. But how can conflicts be managed when multiple plugins want to update the gutter on the same line?

I'm attempting to use ALE to show eslint errors with NeoVim 0.4.0. I believe I had it working before but now it's not. However, I can see that my git gutter plugin is working fine and I suspect some kind of conflict between plugins updating the gutter.

I read once about some "gutter manager" plugin that could coordinate all the potential gutter updates, but now I can't a reference to it. Is there a single plugin that can handle all the common uses of the gutter, including managing conflicts?

5
  • 5
    In general there is no good solution for this. It needs to be discussed with the various plugins authors. However, I believe Neovim allows to display more signs, check the help for signcolumn. Sep 18, 2019 at 7:16
  • The Neovim help docs saya that the default for signcolumn is auto: to expand automatically to accomodate up to 9 signs. It's still not clear how it knows when one sign is to replace another (like when the Git symbol changes from one to another) versus when to expand and display two symbols (when both Git and Eslint want to display a symbol). Sep 19, 2019 at 14:24
  • I still don't understand why you have problems. What is the output of :sign place for a buffer where you expect signs to be shown from both plugins? Sep 20, 2019 at 6:15
  • @ChristianBrabandt It returns nothing, also I can see git-gutter symbols and expect deoplete symbols. This is for Neovim 0.3.1. I'll upgrade! Sep 23, 2019 at 14:59
  • Same result for Neovim 0.4.2. I think I need to make a reduced test case with minimal plugins and then continue to add in more plugins I'm using until something breaks. Sep 23, 2019 at 15:16

2 Answers 2

5

Vim currently supports assigning sign priorities (https://vimhelp.org/sign.txt.html#sign-priority). The plugins placing the signs need to use the newer sign APIs.

2

Here's the answer I found for Neovim.

First, Neovim will display up to nine signs in the gutter by default, so plugins don't have to fight over sharing just one or two columns.

Second, there is sign-id metadata associated with each sign so Neovim can tell which plugin the sign belongs to.

Finally, a signpriority option has been proposed. This would contain something like an array of plugin names which specify which signs should get priority if there is not enough space to save this all-- in other words it lets you determine who wins the gutter fight!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.