Skip to content

Go To Definition #5

@z80dev

Description

@z80dev

For any given symbol usage, we want to be able to jump to the point in our code where the symbol was defined.

LSP API Methods

  • textDocument/definition

there is also potential overlap with the textDocument/declaration method to be explored as part of the implementation of this feature.

Variations of Definition Lookups

Variables

x: uint256

@external
def foo() -> uint256:
    return self.x

Running Go To Definition on the usage of self.x within foo() should jump the cursor to the first line, where x is declared/defined.

Functions

x: uint256

@external
def foo() -> uint256:
    return self.bar()

@internal
def bar() -> uint256:
    return self.x

Running Go To Definition on the usage of self.bar() within foo() should jump the cursor to the line where the function bar() is declared

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions