rust-lang / rust-lang/rust-analyzer

Consider splitting auto-import and fuzzy completion into separate features.

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

Nobody has claimed this yet.

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

Description

Auto-import is not always desired and fuzzy completion is a useful feature on its own.

Sometimes, items are only used once and sometimes fully qualified names add clarity. For example,
we don't know what from_ref is but its clear what std::slice::from_ref is.

Consider changing the behavior to the following:

  • Make fuzzy completion to be its own feature.
  • Make auto-import to be an option for fuzzy completion which can be on, off ask ask, where ask will ask a user whether they want to import an item or fully qualify it. Option ask can also have a sub-option for the default choice of action to be set to import or qualification.

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 locating the existing fuzzy-completion and auto-import entry points, then read how their configuration and user prompts are represented. Define the separate fuzzy-completion feature and the on/off/ask auto-import behavior, including the default action for ask; done means the configuration and interaction behavior are specified and covered by relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.