neoclide / coc-python

Python extension for coc.nvim, fork of vscode-python
574 stars 51 forks source link

Definition provider not found for current document #269

Open jiangjianshan opened 4 years ago

jiangjianshan commented 4 years ago

Hello,

My Vim version is 8.2.1563 and using coc.nvim and coc-python for python, all of them are always keep the newest version.

I have 'nmap gd (coc-definition)' in my _vimrc. I have press 'gd' without quotation marks which want to go to the definition of main() function of ranger.main, but got the error as showing as below:

image

Here is part of my setting for coc-settings.json: image

It seems like coc-python not working if the definition of function on another source code file but not in the same folder as the one where press 'gd' command. Do I need a setting which have to add the file paths for those .py files inside the project I'm reading for to solve this issue? If not, what should I do for the setting for coc-python?

jiangjianshan commented 4 years ago

Hello,

I have just found if I open the .py from the window control by vim-startify, the issue will happen. If I open the .py on the Exploer local, coc-python can work. Is there some key mechanism to trigger coc-python work are differernt for these two way? image