-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support for projects without Cargo.toml
#8818
Comments
Check out https://rust-analyzer.github.io/manual.html#non-cargo-based-projects for how to setup r-a to work without cargo. |
Solved! Thank you! |
hey @memoryruins, I feel really silly but I just can't for the life of me get any form of autocomplete working with my noncargo project. I put {
"sysroot_src": "C:/Users/ebrob/.rustup/toolchains/nightly-x86_64-pc-windows-msvc/lib/rustlib/src/rust/library",
"crates": [
{
"root_module": "src/main.rs",
"edition": "2018",
"deps": []
}
]
} No errors appear, it seems like it would work, and yet the only source of autocomplete is from tabnine, not fun. Its surely a silly mistake on my end. |
Huh. I have working completion with this one, which looks to be the same as yours: {
"sysroot_src": "/home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library",
"crates": [
{
"root_module": "src/main.rs",
"edition": "2015",
"deps": []
}
]
} Try setting RA_LOG and seeing what you can find, here's one that is not too spammy. Add the below snippet into your JSON settings for your editor, then look in the output view for the R-A language server. It is in "rust-analyzer.server.extraEnv": {
"RA_LOG": "info,salsa::derived::slot=warn,rust_analyzer::main_loop=warn,project_model=debug"
} |
o/ @lf- , if I did everything right I should be getting output, here it is as a paste (I, unfortunately, could not find anything odd) https://pastie.io/vmjaqb.sql I can't imagine there is a conflict somewhere, the normal |
The RA server trace in vscode says
|
Hello, so I also need to use rust-project.json to detect my rust projects but slightly for a different case as my projects have a Here's my architecture.
Code here. |
You probably just want the |
Love and light. Thanks. |
Closed as partial support has been added |
I have been using
rust-script
for some small projects. Unfortunately, rust-analyzer won't work because it can't find cargo.toml. Is there a work around for this?The text was updated successfully, but these errors were encountered: