rust-lang / rust-lang/rust-analyzer
Creating a shortcut to build and run Rust
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
I know there is a shortcut called "rust-analyzer.run", but that opens a window for running a few options. However, there are a few problems I have with the options. The main one being that if my cursor is not in the main function, I cannot select to run the code.

I would like a shortcut that runs a file as seen below, but without needing to click it

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.
Research direction
Start with the existing "rust-analyzer.run" command and compare its options with the file-running action shown in the issue. The change is complete when a shortcut can build and run a Rust file without requiring the cursor to be in its main function or clicking the run control.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100