Redundant line in Python doc popup
How to reproduce:
In .vimrc, put set completeopt-=preview and set completeopt+=popup.
Then open a Python file and type something, for example prin. Press Ctrl-Space to show the completion menu. Press Ctrl-N to select print. A popup will appear.
The bug: As opposed to what would have happened in a preview scratch buffer, the popup will display the function signature twice (see screenshot).
Now this is an interesting case. First, this can only happen with popup. https://github.com/ycm-core/YouCompleteMe/blob/master/python/ycm/client/completion_request.py#L195-L201
If the select completion item's info does not start with extra_menu_info, we want both in the popup.
These properties are populated by the server, which for python is here:
https://github.com/ycm-core/ycmd/blob/master/ycmd/completers/python/python_completer.py#L269-L270
And the _BuildTypeInfo is here:
https://github.com/ycm-core/ycmd/blob/master/ycmd/completers/python/python_completer.py#L416-L427
So the docstring is provided by jedi and does not include def .
The type info that we build relies on jedi's definition.description, which does contain def.
Looking at the jedi API, maybe we should be using definition.name instead.
Mind trying that out and reporting your experience?
Nope. Replacing description with name massively hinders other parts of completion. I'm not sure we'll be able to find a proper solution...