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

fix: Fix code navigation for enum values #220

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

varungandhi-src
Copy link
Contributor

Motivation

With this patch, we reduce divergence from Sorbet by using a zero-length location
for the synthetic classes generated when rewriting enums. We also add a special-case
for emitting definitions for enum values, since I wasn't able to figure out a better
way to do the same thing.

Fixes #214

Test plan

Covered by snapshot tests.

Comment on lines -13 to +12
# ^ definition local 2~#119448696
# ^ definition [..] X#A#
# ^ reference [..] X#A#
# ^ reference [..] X#A.
# ^ definition [..] X#A.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main change is that this correctly shows up as a definition rather than as a reference, and that spurious entities are no longer present here.

@varungandhi-src varungandhi-src merged commit af8a120 into scip-ruby/master Jul 16, 2024
2 checks passed
@varungandhi-src varungandhi-src deleted the vg/fix-enum-nav branch July 16, 2024 13:38
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.

Improve Go to definition for enums
1 participant