Skip to content

LSP Jump to Definition for LOCAL bindings #5663

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

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

ChrisPenner
Copy link
Contributor

Overview

Adds LSP support for "jump to definition" for local bindings.

After the changes for local-var type info this was absolutely trivial to add :)

Notes:

  • this uses the same implementation for 'jump to definition" "jump to declaration" and "jump to implementation" when invoked on locally bound var references.
  • Types, and jumping to things in your codebase aren't implemented and aren't likely to be implemented unless VSCode changes its "prefetch" behaviour :'(

Implementation notes

  • Use the binding location information collected during typechecking
  • When invoked, use the location of the cursor to look up the relevant symbol, map that to its binding site, then jump there.

Test coverage

  • Tests? None yet, but could try to dream some up

@ChrisPenner ChrisPenner changed the title LSP Jump to Definition LSP Jump to Definition for LOCAL bindings Apr 25, 2025
Base automatically changed from cp/local-var-notes to trunk April 25, 2025 18:59
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

Successfully merging this pull request may close these issues.

1 participant