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

Scope aware symbol resolution #649

Merged
merged 16 commits into from
Jan 2, 2023
Merged

Scope aware symbol resolution #649

merged 16 commits into from
Jan 2, 2023

Conversation

skovhus
Copy link
Collaborator

@skovhus skovhus commented Jan 2, 2023

Resolves #220 #318 #318 #515

When auto-completing on symbols or using jumping to definition, the server currently uses a simple and faulty heuristic of using all symbols available in the file and sourced files.

This PR introduces a better heuristic of taking the scope into account, both locally and when sourcing files. This means:

  • jump to definition is improved across files: jump to the latest definition in a sourced file, and never to inaccessible local scoped variables
  • local variables are only suggested when available
  • jump to definition is always using the latest definition of a symbol

Related #548 #510

@skovhus skovhus force-pushed the scope-aware-symbols branch from 170cb1b to 4b4b2ce Compare January 2, 2023 18:47
@skovhus skovhus marked this pull request as ready for review January 2, 2023 18:49
@skovhus skovhus merged commit a86c78a into main Jan 2, 2023
@skovhus skovhus deleted the scope-aware-symbols branch January 2, 2023 19:18
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.

Scope aware symbol completion
1 participant