I have coc.nvim
with pyright
installed. I added the following to my .vimrc
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
I was hoping that pressnig gi
over a function name will take me to the implementation, but alas, neither that nor gy
does anything. This is the output of :CocInfo
:
undefined## versions
vim version: VIM - Vi IMproved 8.1 8012269
node version: v14.15.0
coc.nvim version: 0.0.79-8b967b0bbd
coc.nvim directory: /home/fbence/.vim/plugged/coc.nvim
term: dumb
platform: linux
## Log of coc.nvim
2020-12-12T18:33:40.895 INFO (pid:131785) [services] - registered service "pyright"
2020-12-12T18:33:40.896 INFO (pid:131785) [services] - Pyright Server state change: stopped => starting
2020-12-12T18:33:40.945 INFO (pid:131785) [plugin] - coc.nvim 0.0.79-8b967b0bbd initialized with node: v14.15.0 after 146ms
2020-12-12T18:33:40.952 INFO (pid:131785) [language-client-index] - pyright started with 131932
2020-12-12T18:33:41.096 INFO (pid:131785) [services] - Pyright Server state change: starting => running
2020-12-12T18:33:41.100 INFO (pid:131785) [services] - service pyright started
2020-12-12T18:33:42.654 INFO (pid:131785) [completion-complete] - Results from: around,pyright-1
2020-12-12T18:33:45.820 INFO (pid:131785) [completion-complete] - Results from: around,pyright-1
2020-12-12T18:34:48.147 WARN (pid:131785) [Handler] - type definition provider not found!
2020-12-12T18:34:55.149 WARN (pid:131785) [Handler] - implementation provider not found!
Is something not configured properly, or is this feature missing from pyright
?
CLARIFICATION
Let's say I have two files
# second.py
def myfunc(arg1):
return 3*arg1
# first.py
from second import myfunc
a = myfunc(3)
# |
My cursor is in first.py
as designated by the |. If I press gd
here the cursor will jump up a line to the line with the import and be on myfunc
there. I would think, that gi
would be what takes me to the function implementation in second.py
.
type definition provider not found
andimplementation
look suspicious... Try searching for those on Google.