ruby-lsp-rails
ruby-lsp-rails copied to clipboard
WIP: Routes autocomplete
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.rbchanges?~ - [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)