Shopify / Shopify/ruby-lsp-rails

Expose controller action route/view info through non-codeLens LSP methods

Open
#694 0 comments 0 reactions 0 assignees View on GitHub

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/_url route helper jumps to the route definition in config/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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.