Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Goto definition / peek definition leads to import, not to definition itself #1162

Closed
DonJayamanne opened this issue Jun 3, 2019 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@DonJayamanne
Copy link

@aliev commented on Tue May 28 2019

Environment data

  • VS Code version: Version 1.34.0 (1.34.0)
  • Extension version (available under the Extensions sidebar): 2019.5.17517 (languageServer.0.2.87)
  • OS and version: OSX 10.14.5 (18F203)
  • Python version (& distribution if applicable, e.g. Anaconda): 3.5.5
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • Relevant/affected Python packages and their versions: ESlint (1.9.0), Git Lenses (9.8.1)

Expected behaviour

Go to definition should open definition itself, not the import. It works fine when jedi is enabled.

Actual behaviour

Unlike Jedi, Goto definition / peek definition leads to import, not to definition itself. It's a bit annoying and not configurable. I'm not sure is it bug or can it be configurable somewhere?

Steps to reproduce (Jedi disabled):

Video uploaded here: https://www.youtube.com/watch?v=b9wdLka770g

1) from django.http import HttpResponse

2) HttpResponse <- CMD+Left mouse click (Leads to 1 not to class HttpResponse)

My settings.json: https://gist.github.com/aliev/6134f897587390dec4c3ffe40390d9ab


@DonJayamanne commented on Thu May 30 2019

@aliev I'm sorry to hear about the issue you're facing.
Please could you take the time to fill in the issue template with the missing information. We need this information to be able to help you.
Are you using jedi or MS Language Server. Please check you user and workspace settings.json and check if you have the setting "python.jeditEnabled", if you do please let me know what it is.

Finally, please could you provide some sample code to replicate this issue. I don't quite understand the problem. I believe a sample code would remedy this.


@aliev commented on Fri May 31 2019

@DonJayamanne sorry for confusing. I updated description and attached video

@jakebailey
Copy link
Member

Closing in favor of #1138.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants