tagbar icon indicating copy to clipboard operation
tagbar copied to clipboard

How to turn the pop-up window off?

Open RyanZZZZZ opened this issue 5 years ago • 6 comments

A feature appears to be annoying: the prototype of a tag in the pop-up window shows up every time I put the cursor on a variable or a function, with the prototype and comment with it, and a “X” in the upper-right corner. I can click the "X" to close the window when in mouse mode, however, I'm not using this mode often :(. So, anyone knows how to disable the feature? Great THANKS!

RyanZZZZZ avatar May 07 '20 08:05 RyanZZZZZ

I'm not seeing anything like this. Are you sure this is a function of tagbar and and not some other plugin you have active acting on the content of the tagbar pane?

Also if you could supply some details such as your OS, what flavor and version of Vim you are using, what flavor and version of ctags you have, what language you are editing, and any other plugins you have running that would be useful.

Also if you can come up with a minimal rc file and steps to reproduce this it would help more.

alerque avatar May 07 '20 08:05 alerque

I'm not seeing anything like this. Are you sure this is a function of tagbar and and not some other plugin you have active acting on the content of the tagbar pane?

Also if you could supply some details such as your OS, what flavor and version of Vim you are using, what flavor and version of ctags you have, what language you are editing, and any other plugins you have running that would be useful.

Also if you can come up with a minimal rc file and steps to reproduce this it would help more.

Ummm, I found it in the doc/tagbar.txt:

Displaying the prototype of a tag~ Tagbar can display the prototype of a tag. More precisely it can display the line(s) in which the tag is defined. This can be done by either pressing <Space> when on a tag or hovering over a tag with the mouse. In the former case the prototype will be displayed in the |Command-line|, in the latter case it will be displayed in a pop-up window. The prototype will also be displayed if the cursor stays on a tag for 'updatetime' milliseconds. In that case the prototype may be abbreviated in order to avoid |hit-enter| prompts.

As you can see, the pop-up window does exists and it matches the behavior I discribed above, but I didn't see any approach to disable this little window :(. Btw, once I removed tagbar, the window disappeared, so, the problem is with tarbar for sure.

RyanZZZZZ avatar May 07 '20 09:05 RyanZZZZZ

I see. There are features in here I haven't even discovered yet!

Check out :help tagbar and the heading Changing an existing definition. It specifically covers how to disable the prototype function for a given filetype. That will probably fix your issue, but I'm not sure there isn't something else missing. There is a key mapping for showing the prototype definition too, but it seems like it's getting auto-triggered in your case, no? Or are you using the mouse to click on it? I don't quite understand when the popup is triggered for you. Perhaps there is a config setting missing that we could add to suppress that without disabling processing prototypes altogether.

alerque avatar May 07 '20 09:05 alerque

I see. There are features in here I haven't even discovered yet!

Check out :help tagbar and the heading Changing an existing definition. It specifically covers how to disable the prototype function for a given filetype. That will probably fix your issue, but I'm not sure there isn't something else missing. There is a key mapping for showing the prototype definition too, but it seems like it's getting auto-triggered in your case, no? Or are you using the mouse to click on it? I don't quite understand when the popup is triggered for you. Perhaps there is a config setting missing that we could add to suppress that without disabling processing prototypes altogether.

Well, in my case, I use "set mouse=" in ~/.vimrc, and yes, it's triggered automatically when I just put the cursor on a variable or a function in my code for a few seconds. Only if I switch it to the mouse mode can the window be closed by clicking the "X" with mouse, which is kinda annoying :(.

I checked the Changing an existing definition part and did ":TagbarGetTypeConfig go" to get its default configuration:

let g:tagbar_type_go = {
    \ 'kinds' : [
        \ 'p:package',
        \ 'i:imports',
        \ 'c:constants',
        \ 'v:variables',
        \ 't:types',
        \ 'n:interfaces',
        \ 'w:fields',
        \ 'e:embedded',
        \ 'm:methods',
        \ 'r:constructor',
        \ 'f:functions',
        \ '?:unknown',
    \ ],
\ }

As you can see, there's no prototype specified in it :(. Any idea how to work it out? Thanks.

RyanZZZZZ avatar May 07 '20 10:05 RyanZZZZZ

@RyanZZZZZ Can this be controlled via the g:tagbar_show_balloon configuration parameter? I currently don't see this in my configuration, so I am not able to test it. It might be how my version of vim is compiled though...

raven42 avatar Oct 28 '20 15:10 raven42