rust-lang / rust-lang/rust-analyzer

Creating a shortcut to build and run Rust

Open
#14,249 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-support
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.
image

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

image

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.