rust-lang / rust-lang/rust-analyzer

[Feature request] Request to try to apply a code action(assist)

Open
#15,247 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

It would be nice if we were able to attempt apply code actions without opening the code action menu, so one can set certain IDE hotkeys to "just do things", like adding explicit typing. (Inspiration: Intellij, where you can basically bind any code action)

The request would probably be very similar to how code action list works, but it gets run immediately, or respond that said assist is not available

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 reviewing how the existing code action list and assist flow work, including how an unavailable assist is reported. Define the behavior for invoking an assist directly without opening the code action menu, and verify that IDE hotkeys can trigger it and receive an unavailable response when appropriate.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.