rust-lang / rust-lang/rust-analyzer

Add config to toggle between using `Self` and actual type names in assists

Open
#11,231 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-config A-ide C-feature S-actionable
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

Currently, our assists sometimes use Self, sometimes use the type name without consistency(I think so at least, might be wrong on this). There is no clear guideline on when to use either so currently its usually just preference of the developer. We should help out here by allowing people to choose whether our assists should always use the types name, or if the assist should prefer using Self where applicable.

https://twitter.com/brendanzab/status/1478496314597920769

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 surveying the assists that currently choose between Self and concrete type names, then identify how assist configuration is represented. Define the preference behavior and its scope before implementation; done means the selected preference is applied consistently across the relevant assists and both choices are covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
developer-experience
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.