Open
Description
In #358, definition support for associations was added. We can do the same thing for hover, which would be quite nice in my opinion.
Implementation
- Start returning the fully qualified name of the constant related to the association from the server here
- Generalize this API to return the full information about an association, rather than being specific about locations only
- Fix the API changes in definition.rb
- Then use a similar approach to produce hover content
Activity
andyw8 commentedon Oct 4, 2024
(implementation was in #373)
rogancodes commentedon Apr 23, 2025
Hi Team, Im looking at this issue.
domingo2000 commentedon May 31, 2025
Hi!. I also started working on this. Already have it working, but my question for the implementation is ¿Which kind of information should we show on hover?. I thought that we could start showing the same information as RubyLsp in constant hovering, copying the implementation from there.
Here is a demo:
Screencast.from.31-05-25.14.02.28.webm
It would be nice to have feedback on this.
vinistock commentedon Jun 18, 2025
Hey, @domingo2000! I think we can show what the LSP normally does for any class. So we'd just use the same process as definition to figure out which class represents the association and then we'd show the definition links + documentation for the class.
domingo2000 commentedon Jun 19, 2025
Hi @vinistock!, This PR does just that, happy to receive feedback there 👌🏻. If some refactor to unify that common logic is necessary ping me in the PR and i should be able to work on these when i have time available.