-
Notifications
You must be signed in to change notification settings - Fork 154
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
Support inherited methods in definition, hover and completion #2028
Conversation
So this should also allow us to improve Definition in ruby-lsp-rails, e.g. so that a callback method can be found even if defined in a parent controller? |
Yes. And this will happen automatically, by making |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we also handle go to and hover to super
now?
401c668
to
9566119
Compare
3464078
to
cb1afee
Compare
Motivation
Step towards #899
Use the linearized ancestor information from #2024 to support inherited methods for definition, hover and completion.
Implementation
resolve_method
to linearize ancestors lazily. Then we search ancestors in order and return the first methods we return, which ensures we jump to the right methodAutomated Tests
Added tests.
inheritance_resolution.mov