Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

Go To Definition not working #302

Open
davidlubomirov opened this issue Nov 1, 2020 · 1 comment
Open

Go To Definition not working #302

davidlubomirov opened this issue Nov 1, 2020 · 1 comment

Comments

@davidlubomirov
Copy link

coc-settings.json

{
	"python.jediPath": "/usr/local/lib/python3.8/site-packages",
	"coc.preferences.formatOnSaveFiletypes": ["python"]
}

I've installed jedi as global in order not to install it every time for each project that's using virtual environment.

$: pip3 show jedi
Name: jedi
Version: 0.17.2
Summary: An autocompletion tool for Python that can be used for text editors.
Home-page: https://github.com/davidhalter/jedi
Author: David Halter
Author-email: [email protected]
License: MIT
Location: /usr/local/lib/python3.8/site-packages
Requires: parso
Required-by: python-language-server

With this setup, go to definition isn't working.
I've just started using coc and I'm not sure what I'm missing.

@xylix
Copy link

xylix commented Nov 10, 2020

I'm using python MSLS and having problem with go to definition

{
    "codeLens.enable": true,
    "python.jediEnabled": false,
    "python.formatting.provider": "black",
    "python.linting.mypyEnabled": false,
    "python.linting.mypyArgs": ["--ignore-missing-imports","--follow-imports=silent","--show-column-numbers"],
    "python.linting.pylintEnabled": true
}

And go to definition is broken for me as well:

2020-11-10T10:50:35.656 INFO (pid:40506) [extension:coc-python] - Python Extension: Cached data exists getEnvironmentVariables, /Users/kerkko/Code/rpaframework
2020-11-10T10:50:36.228 ERROR (pid:40506) [attach] - Notification error: jumpDeclaration [] TypeError: Cannot destructure property 'uri' of 'location' as it is undefined.
    at Handler.handleLocations (/Users/kerkko/.vim/plugged/coc.nvim/build/index.js:89031:19)
    at Handler.gotoDeclaration (/Users/kerkko/.vim/plugged/coc.nvim/build/index.js:88199:20)
    at async Plugin.cocAction (/Users/kerkko/.vim/plugged/coc.nvim/build/index.js:23990:16)
    at async NeovimClient.<anonymous> (/Users/kerkko/.vim/plugged/coc.nvim/build/index.js:11595:21)

Running nightly neovim

## versions

vim version: NVIM v0.5.0-nightly-88-gc10c2fab5
node version: v12.18.3
coc.nvim version: 0.0.79-6cb5c6cd2d
coc.nvim directory: /Users/kerkko/.vim/plugged/coc.nvim
term: iTerm.app
platform: darwin

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants