Shopify / Shopify/ruby-lsp

Investigate the possibility of add-ons enhancing find references

Open
#2,792 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement pinned server
Dominant language
Ruby
Stars
2k
Forks
281
Avg merge
2h 14m
Merged PRs (30d)
6

Description

There are certain situations where references to declarations may exist in a DSL form. For example, in Rails, if you were to rename/find references for a model, then associations made to that model should be included as well.

class Post
end

class User
  has_many :posts # <<< this should be counted as a reference to the `Post` class, despite being a symbol
end

We will need to study what use cases exist and how to allow for this. Maybe this should be a concern of indexing enhancements and we should expedite the work to merge the reference finder with the declaration listener.

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 cataloguing the DSL reference use cases described in the issue, including Rails associations such as has_many :posts. Then investigate the indexing enhancements and the proposed merge of the reference finder with the declaration listener; done means an agreed design and implementation path for recognizing these references.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.