Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code navigation should support self navigating to the class defintion #1637

Closed
jarshwah opened this issue May 8, 2018 · 8 comments
Closed
Labels
feature-request Request for new features or functionality

Comments

@jarshwah
Copy link

jarshwah commented May 8, 2018

Environment data

  • VS Code version: 1.23.0
  • Extension version (available under the Extensions sidebar): 2018.04
  • OS and version: OSX 10.13.4
  • Python version (& distribution if applicable, e.g. Anaconda): pyenv 2.7 - 3.6
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): virtualenv

Actual behavior

When command clicking on the self argument of a method, the code does not navigate anywhere. CMD+Hover over self will show the current method in the preview window.

Expected behavior

(Wanted behaviour rather than expected)

When CMD+Click on the self argument to a method, the cursor should navigate to the class definition. When CMD+Hover over the self argument, the class definition should be shown in the preview window.

This will help with very long class definitions where many classes exist in the same file, such as some django projects having large models.py files (an anti-pattern, but one in very wide use).

Otherwise, a "simple" way to navigate to the current class definition would be nearly as good.

@hmleal
Copy link

hmleal commented May 8, 2018

👍

@DonJayamanne DonJayamanne added feature-request Request for new features or functionality needs decision labels May 8, 2018
@brettcannon
Copy link
Member

@hmleal we track feature requests by reaction upvotes, so please do that if you would like your vote to be counted.

@hmleal
Copy link

hmleal commented May 10, 2018

@brettcannon Thanks ;)

@MikhailArkhipov
Copy link

@jarshwah - is this something you expect

image

and go to def on any self goes to the respective class definition - not just when it is function argument.

@jarshwah
Copy link
Author

jarshwah commented Oct 12, 2018 via email

@MikhailArkhipov
Copy link

OK, that is the way I implemented it. :-)

@jarshwah
Copy link
Author

@MikhailArkhipov this is done in upstream, no? Can we then close off this issue?

@brettcannon
Copy link
Member

@jarshwah yep, I just verified this is available publicly.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

5 participants