Skip to content

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

Closed
@jarshwah

Description

@jarshwah

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest for new features or functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions