When I start typing a line, for example plt.subp
it will show suggestions from matplotlib.pyplot
, if I have imported the library above. This is the expected behaviour. The problem is that this is not happening with numpy. For example say I want to write np.linspace
; while I am typing, at no point in time it will show me the the dropdown menu with suggestions (e.g. when I write np.l
I should get suggestions like log
, log10
, linspace
, logspace
, etc, but that does not happen). The weird thing is that after I type for example np.linspace(
, Jedi will show me all the relevant information about linspace
.
The setup: I am trying to set up VSCodium as a python IDE. In order to isolate the problem as much as I can, I have created a virtual environment and I use this as my Python Interpreter. I have installed a few libraries in the virtual environment, including numpy. I use Jedi as my language server. I have also installed the Python Extension.
Am I missing something obvious here? Do you have any troubleshooting suggestions?
Notes:
Using pylance instead of jedi solves the above problem. But this is not a solution of course.
The similar issue has been solved on github.
The solution is that install jedi-language-server in your Python environment (system Python, conda, homebrew, etc) and update your settings.json with the path to your jedi-language-server executable. Example:
{
"jedi.executable.command": "/PATH/TO/JEDI/LANGUAGE/SERVER"
}
By the way, Pylance is really a good choice.