coc-python
coc-python copied to clipboard
Gd does not jump to definitions in a different file
When I gd
on some_function
defined in a different file, the navigation just takes me to the importing statement from local_module import some_function
instead of leading to the original file where the definition of some_function
is. I have tried to search for answers but can't find anything. I tried to disable jedi and used MPLS instead, but the problem persisted.
I used jedi-vim before this, and code navigation worked as expected then (jumping to file where definition is given).
Please help and tolerate; I'm a noob.
Try minimal vimrc, I can't reproduce.
I encounter the same problem, but I can jump to another file by gd one time when a file is opened. After jump back to the original file, I cannot jump to another file again. I can't use completions either, always show source jedi timeout after 5000ms
I use the same vimrc and it works properly 1 month ago.
It's weird. The symptom happened on both win10 env which I use vim frequently. I install vim on the third computer, it works fine. After uninstalling coc-python and add recommend config from https://github.com/neoclide/coc.nvim/wiki/Language-servers. The completions function and gd work perfectly.
Try minimal vimrc, I can't reproduce.
I tried with minimial vimrc, but the same problem appears. Here's the screenshot:
It's weird. The symptom happened on both win10 env which I use vim frequently. I install vim on the third computer, it works fine. After uninstalling coc-python and add recommend config from https://github.com/neoclide/coc.nvim/wiki/Language-servers. The completions function and gd work perfectly.
Thanks for the suggestion. I will try this, but it seems like it's a stand-in for coc-python?
I tried to uninstall python2.X then coc-python work fine.
I found a way to reproduce it.
- Install python27 and python3x on the system, install jedi, python-language-server for them.
- Open vim. Select interpreter many times, :CocCommand python.setInterpreter and :CocRestart several times.
- Check the Goto definition and completion function don't work properly.
I found a way to reproduce it.
- Install python27 and python3x on the system, install jedi, python-language-server for them.
- Open vim. Select interpreter many times, :CocCommand python.setInterpreter and :CocRestart several times.
- Check the Goto definition and completion function don't work properly.
Thank you. This made a lot of sense. I use Mac, so it comes with python27 in the OS. I'm kinda not sure about deleting it though. I hope the owner of the repo can figure out the bug.
I fixed this by setting python.pythonPath
in :CocConfig
to the correct version of python (I'm using 3.7.8).
I encountered this problem after installing a different version of python using pyenv
on a Mac which comes with python27 like you guys mentioned.