Shopify / ruby-lsp-rails

A Ruby LSP addon for Rails
https://shopify.github.io/ruby-lsp-rails/
MIT License
515 stars 21 forks source link

Including column constraints, foreign keys and indexes on hover #394

Open janko opened 1 month ago

janko commented 1 month ago

I was looking to replace the Annotate gem with Ruby LSP, but I noticed that its schema information is much slimmer than what Annotate offers. I'm often looking at NOT NULL constraints, default values, foreign keys and indexes in Annotate comments, but Ruby LSP currently shows only column names and types. Is that possibly on the roadmap?

vinistock commented 1 month ago

Thank you for the feature suggestion! It would be great to show more of the schema information on hover. It's not in our immediate roadmap, but our team will be glad to provide assistance and review any PRs if someone wishes to contribute that.

Earlopain commented 3 weeks ago

Here's the implementation of annotate for attributes: https://github.com/ctran/annotate_models/blob/5d01c4171990c4fe7b9b0977b05ce14a98209e53/lib/annotate/annotate_models.rb#L936-L982 to give an idea of what it all does