Open damnskippy opened 4 years ago
Have you tried just dropping that block entirely and seeing how it works? We might consider just allowing it by default, but it would be nice to understand what the restriction was about in the first place and what the other side effect are that might be unwanted.
I assume this might get complicated because we already don't deal with splits very well, and even switching buffers is bumpy.
Yes dropping the block works fine. It's perfectly reasonable that someone wouldn't want to open a tagbar split in the case of a diff window, and this is likely the reason. However tagbar is not even proceeding to load the tags in this case because diff is set to true i.e. tagbar is completely shut off and unavailable. What I was suggesting is that if there's a user setting allow_tagbar_in_diff the user then has a choice, they can choose to not open the tagbar window but tagbar is still available if the user wants to. And the tagbar APIs like currenttag continue to be availalble as well.
I definitely see the use case for this, and yes we should make a way for it to happen.
In my case by far the most common diff split I have open is using :Gdiff
from vim fugitive. We will need to figure out how to **avoid*** generating tags for buffers that are not backed by actual files.
It seems tagbar is disallowed if vim is set to diff mode: https://github.com/majutsushi/tagbar/blob/f1bea00e5be714b14c7401f86a32aed558b0b415/autoload/tagbar.vim#L3138
Is it possible have a user setting to allow tagbar in diff mode as well? For instance, I currently rely on tagbar#currenttag() to set the context in the statusline. While doing diff especially more than any other time, the current tag is useful to have while going through a long file full of differences to see the current function tag that is currently being displayed by vim diff.
Thanks.