coc-python icon indicating copy to clipboard operation
coc-python copied to clipboard

Definition provider not found for current document

Open jiangjianshan opened this issue 3 years ago • 1 comments

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 <Plug>(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 avatar Sep 03 '20 06:09 jiangjianshan

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

jiangjianshan avatar Sep 04 '20 02:09 jiangjianshan