davidhalter / jedi-vim

Using the jedi autocompletion library for VIM.
MIT License
5.28k stars 370 forks source link

Very limited preview capabilities for external modules #871

Closed Time0o closed 3 years ago

Time0o commented 6 years ago

Issue

Not sure if this is an issue with jedi-vim, jedi itself or my system setup but in many cases the preview window will not pop up and display function type hints for non-standard python modules, e.g. in my case PyQt4.

Steps to reproduce

For the following snippet, when typing self., available methods are displayed correctly, but when I select e.g. addAction in the drop-down list, no preview window is displayed. However, I assume that information regarding the function parameters and return types is available to Jedi since PyCharm correctly infers def addAction(self, action: QAction) -> None in the same situation.

from PyQt4 import QtGui

class Foo(QtGui.QDialog):
    def __init__(self, parent=None):
        super(Foo, self).__init__(parent)
        self.addAction*

Output of “:verbose JediDebugInfo”

Jedi-vim debug information

jedi-vim version
Global Python

Using Python version 3 to access Jedi.

Jedi
Jedi environment: <SameEnvironment: 3.7.0 in /usr>
Known environments
Settings
g:jedi#force_py_version = 3 (default: 'auto')

  omnifunc=jedi#completions
        Last set from ~/.vim/bundle/jedi-vim/autoload/jedi.vim
  completeopt=menuone,longest,preview
        Last set from ~/.vim/bundle/jedi-vim/autoload/jedi.vim

I don't know whether Python 2 should really be listed under Known environments.

davidhalter commented 6 years ago

This is probably also an issue with Python3.7. It's not yet supported. We're working on it.

davidhalter commented 3 years ago

I'm pretty sure this is better now, because Python 3.9 is now supported and Python 3.7 as well.

Feel free to open a new issue if this is still a problem for you.