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

Go To Definition #5

Open
Tracked by #1
z80dev opened this issue Sep 18, 2023 · 0 comments
Open
Tracked by #1

Go To Definition #5

z80dev opened this issue Sep 18, 2023 · 0 comments

Comments

@z80dev
Copy link
Collaborator

z80dev commented Sep 18, 2023

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

@z80dev z80dev mentioned this issue Sep 18, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant