Add go to definition for methods
vinistock opened this issue · comments
Vinicius Stock commented
Depends on #898
Use the index to provide go to definition for methods.
Might depend on exploring using a control flow graph (CFG) to implement reaching definitions. While we do not provide typechecking, using reaching definitions might allow us to be more precise.
For example
a = "something"
# We know that `a` is a string because it's a literal, so we know 100% sure this has to be
# String#upcase. If we have an implementation of reaching definitions, we can make this work
a.upcase
Checklist
- Attributes. The LSP protocol has special types for them, so we should create a separate index entry
- Taking
new
invocations toinitialize
. For completion, it's actually the opposite, we need to use the signature forinitialize
, but complete tonew
- Method aliases through
alias_method
andalias
github-actions commented
This issue is being marked as stale because there was no activity in the last 2 months
Justin Kyryliuk commented
Just bumping this since it's not stale and I don't want it marked as closed without being formally acknowledged! 😅
Andy Waite commented
It's not usable yet, but a first step towards this was merged today: #1043