Shopify / ruby-lsp-rails

A Ruby LSP add-on for Rails
https://shopify.github.io/ruby-lsp/rails-add-on
MIT License
555 stars 25 forks source link

Add hover for model associations #476

Open vinistock opened 4 days ago

vinistock commented 4 days ago

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

  1. Start returning the fully qualified name of the constant related to the association from the server here
  2. Generalize this API to return the full information about an association, rather than being specific about locations only
  3. Fix the API changes in definition.rb
  4. Then use a similar approach to produce hover content
andyw8 commented 4 days ago

(implementation was in https://github.com/Shopify/ruby-lsp-rails/pull/373)