rust-lang / rust-lang/rust-analyzer

CLI interface to rust-analyzer

Open
#13,251 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I think at some point we had something like rust-analyzer complete /path/to/file.rs:line:column. I've think we've lost that at some point as not too useful, but, looking at https://users.rust-lang.org/t/how-many-symbols-can-rust-analyzer-autocomplete-in-practice/81400, perhaps we need to bring it back?

I think the way we want to do that is to allow specifying ra-commands inline in file. Ie, the CLI is

$ rust-analyzer complete ./src/foo.rs

and foo.rs contains something like

    let x = /*ra:complete*/

🤔 i guess there's also an argument that we should make the syntax exactly like the syntax of our tests? Ie, today tests say just $0, and its up to the context to figure out what command should we execute at $0, but I can imagine a universal check where you write just $0:complete$, $0:gotodef, etc.

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 examining the proposed rust-analyzer complete ./src/foo.rs entry point and the existing test syntax that uses $0. Compare the inline /*ra:complete*/ proposal with command-specific markers such as $0:complete$ and determine the command semantics and test coverage needed for a usable CLI interface.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.