Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

support for opening a parent directory of the rust project #507

Open
samuela opened this issue Feb 19, 2019 · 7 comments
Open

support for opening a parent directory of the rust project #507

samuela opened this issue Feb 19, 2019 · 7 comments
Labels

Comments

@samuela
Copy link

samuela commented Feb 19, 2019

I have a project laid out as a monorepo, something like:

my-project/
  api/
  web/
  rust-project/

Now rls-vscode works great if I open up vscode at my-project/rust-project/ but it doesn't work at all if I open up the root folder my-project/ as I prefer to do:

could not find 'Cargo.toml' in 'my-project/' or any parent directory

It would be nice to support project lookup relative to the file actually being edited as opposed to just assuming that the whole folder is a rust project. Because monorepos, blah blah blah.

@samuela
Copy link
Author

samuela commented Feb 19, 2019

@lokmeinmatz
Copy link

Having the same issue, kind of annoying :(

@Xanewok Xanewok added the bug label Apr 7, 2019
@supernomad
Copy link

yea just ran into this as well, can work around it but this particular issue does make working with mono-repo style projects less than ideal.

@MonsieurMan
Copy link

A pull request solving this issue is open here #638 !

@samuela
Copy link
Author

samuela commented Apr 23, 2020

FWIW this works out of the box with rust-analyzer.

@abrykajlo
Copy link

@samuela I am not sure it does, I am currently running on Windows with Rust-client Engine set to rust-analyzer in my user settings and it only works for me when my root directory is the rust project folder

@abrykajlo
Copy link

abrykajlo commented Jun 3, 2020

Further testing it looks to only go one parent folder deep. My folder structure looks more like this:

my-project/
    backend/
    webpack-frontend/
        wasm-crate/

when in my-project wasm-crate does not get completion. Although I guess quick fix would be to rearrange like this:

my-project/
    backend/
    wasm-crate/
    webpack-frontend/

then just use a relative path from webpack-frontend to wasm-crate.

Sorry I am just doing stream of conscious, if someone else comes across my same case could be useful.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants