Add name location to classes and modules
@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
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.
Assessment
This issue has not been assessed yet.