Shopify / Shopify/ruby-lsp-rails
Expose controller action route/view info through non-codeLens LSP methods
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 688
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Description
The route and view template information for controller actions is currently only available via textDocument/codeLens. Unfortunately claude code's LSP support doesn't the textDocument/codeLens method. This is likely because "code lens represents a command that should be shown along with source text" and CC is just using LSP to get richer data about the codebase with no intention of showing this enriched data to the user.
This is a total bummer because the data is already available through ruby-lsp-rails.
Contrast this to other elements that are accessible through non-codeLens LSP methods:
- Hovering over an ActiveRecord constant shows the full table schema
- Hovering over an association symbol shows the target model's schema
- Go-to-definition on a
_path/_urlroute helper jumps to the route definition inconfig/routes.rb
Would it be possible to also expose route and view info for controller actions through another LSP method (hover, definition, or whatever makes sense)?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how ruby-lsp-rails currently exposes controller route and view information through textDocument/codeLens, then compare the existing hover and definition behavior described in the issue. Determine which non-codeLens LSP method best fits this data and define completion as controller action route and view information being available through that method for clients such as Claude Code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100