-
Notifications
You must be signed in to change notification settings - Fork 770
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rust projects don't just have a single Cargo.toml. They can have a deep folder structure with multiple crates within. Cargo.lock is a better indicator of the root of the project. Bit even then we probably want to find the _furthest_ away Cargo.foo not the nearest, as that's more likely to be the real project root. Implement that somewhat generically so that other completers can use it. Java already has a similar codepath but it's more complicated so not touching it. Finally, even with the above 2 changes, we still have a problem because there might jjust be gaps. Taking wasmtime project for example there are: ./Cargo.toml ./Cargo.lock ./src/foo.rs ./crates/bar/Cargo.toml ./crates/bar/src/bar.rs ./crates/baz/Cargo.toml ./crates/baz/src/baz.rs So, we allow for the top-level 'project_directory' setting to take precedence _if_ the file opened is in a subdirectory of it.
- Loading branch information
1 parent
a51329a
commit ca8729a
Showing
2 changed files
with
81 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters