Shopify / Shopify/rubydex

Add name location to classes and modules

Open
#487 5 comments 0 reactions 1 assignee View on GitHub

@st0012 is already working on this.

Since Jan 20, 2026.

Dominant language
Rust
Stars
355
Forks
24
Avg merge
2d 6h
Merged PRs (30d)
17

Description

There's one thing missing from class and module indexing to match the LSP: their name location (as opposed to the entire definition's location).

This is necessary because of the way the LSP spec works in this case (example taken from our own code):

class Entry
  class Method < Entry # go to def here
  end
end

Because the parent class Entry constant reference is fully inside the class Entry's location, the editor fires a find references request instead of a go to definition one. This is incorrect since Entry is a reference.

The spec's way of fixing this is allowing servers to return both a name and selection locations, which is what we need to start indexing. The name location is simply the location of the module/class constant_path.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.