Skip to content

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

Description

@carlost

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)?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions