rust-lang / rust-lang/rust-analyzer

Discover unlinked projects and suggest adding them to the settings

Open
#9,661 3 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

In rust-analyzer, it's important to know the set of opened projects up-front. This set of project is stored in the linkedProjects config.

It is possible to link projects dynamically & lazily -- the first time you open an rs file, find the corresonding toml and add it to the project. This has surprising interaction with find usages: if A uses B, and you open B and run fiend usages (or some refactor based on fiend usages), then you'd see usages in A only if you happened to open A in this editing session as well. So, we really want to know, up front, that both A and B exist.

What we could do though, is to notice a project which isn't link, and show a dialog in the edditor asking the user to (automatically), add the newly disccovered project to settings.json.

This needs some work on the server (to notice unlinked projects) and on the client (to actually modilfy the settings).

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

Read the server-side project discovery and client-side settings handling, focusing on linkedProjects and settings.json. Trace how an unlinked project is detected and how the editor can offer adding it; done means the server notices it and accepting the dialog updates settings so the project is linked up front. No specific files or tests are named, so repository tracing is required.

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
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.