ruby-lsp-rails icon indicating copy to clipboard operation
ruby-lsp-rails copied to clipboard

WIP: Routes autocomplete

Open andyw8 opened this issue 1 year ago • 0 comments

I don't think there's any need to cache routes, since even on Core, withover 5000 routes, it takes only 1ms:

shopify(dev)> start=Time.now; Rails.application.routes.named_routes.helper_names.to_a; Time.now-start => 0.001078413

TODO:

  • [ ] ~cache routes, and reload if routes.rb changes?~
  • [x] don't return results if app is using Sorbet
  • [ ] support for routes in engines (see here for ideas)
  • [ ] kind, documentation
  • [ ] disable/enable based on class type (similar approach to https://github.com/Shopify/ruby-lsp/issues/1334)

andyw8 avatar Mar 25 '24 14:03 andyw8