Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discover unlinked projects and suggest adding them to the settings #9661

Open
matklad opened this issue Jul 21, 2021 · 3 comments
Open

Discover unlinked projects and suggest adding them to the settings #9661

matklad opened this issue Jul 21, 2021 · 3 comments
Labels
C-feature Category: feature request E-hard S-actionable Someone could pick this issue up and work on it right now

Comments

@matklad
Copy link
Member

matklad commented Jul 21, 2021

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

@matklad matklad added E-hard S-actionable Someone could pick this issue up and work on it right now labels Jul 21, 2021
@flodiebold flodiebold changed the title Discover unliked projects and suggest adding them to the settings Discover unlinked projects and suggest adding them to the settings Jul 22, 2021
@flodiebold
Copy link
Member

@liby
Copy link

liby commented Aug 10, 2021

I think it's a great idea. With it, many beginners like me won't have issues like #6605.

@ValarDragon
Copy link

This would be amazing, we define rust crates embedded within go packages for our projects, this would save us a lot of complexity in IDE setup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: feature request E-hard S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

No branches or pull requests

4 participants