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 does not work as expected #65

Open
ator-dev opened this issue Sep 20, 2023 · 0 comments
Open

Go to Definition does not work as expected #65

ator-dev opened this issue Sep 20, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@ator-dev
Copy link

ator-dev commented Sep 20, 2023

Go to Definition (usually invoked with F12), by convention, works as follows:

  • If caret is on a symbol instance such as a function call or variable use, the caret is taken to the first character of the symbol at the place it is declared.
  • If caret is on a symbol instance such as a function or variable declaration:
    • If there is one use of the symbol across files in the current workspace, the caret is taken to the first character of the symbol at the place it is used.
    • If there is more than one use of the symbol across the current file, a list UI opens showing the lines of code where it is either declared or used, with the selection on the place it is declared. The user can select one of these items for their caret to be taken to the first character of the symbol at the place it appears.
    • If there is more than one use of the symbol across multiple files in the current workspace, the same list UI opens, but with folding sections containing the lines of code, one section per file (in the file's name).

Current behaviour:

  • If caret is on a symbol instance such as a function call or variable use, the caret is taken to the start of the line at the place it is declared.
  • If caret is on a symbol instance such as a function or variable declaration, the action is blocked with "No definition found".

I believe the list UI is provided by VSCode, as it seems to be constant between extensions.

@pdesaulniers pdesaulniers added the enhancement New feature or request label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants