vscode-rust
vscode-rust copied to clipboard
Rust doesnt give auto complete
I'm not getting any autocomplete in my files. I initiated the project with cargo init. Any ideas?
same problem, no autocomplete at all.
v0.7.8 of the extension.
I ran into the same issue. I was able to partially fix this by following the instructions in this issue: https://github.com/rust-lang/vscode-rust/issues/637. The fix is to switch the engine to use feature-analyzer and also change the feature-analyzer release tag to 2020-08-31.
Same problem here. I just ran rustup update and now there's no auto-completion.
@jsermeno just for the record, the stand-alone matklad.rust-analyzer extension is regularly updated, while the rust-analyzer support in vscode-rust might be somewhat outdated and buggy.
yeah, I had to uninstall the vscode-rust extension and install matklad.rust-analyzer to get a working autocompletion.
vscode-rust + rls or rust-analyzer wasn'T working.
Is there informations somewhere about what we should install officially? It's pretty confusing right now.
@kinwolfqc you can install the one you prefer. RLS and vscode-rust are still the "official" solution, but the plan is to transition to rust-analyzer at some point in the future. RFC 2912 and https://rust-analyzer.github.io/blog/2020/04/20/first-release.html have more details.
In the meanwhile, rust-analyzer is probably more actively developed, but https://www.rust-lang.org/ still recommends RLS without any mention of the former.
I've seen this today, and I fixed it by rolling back to rust 1.46. With 1.47 the autocomplete is broken. Rolling back to rust 1.46 fixed this entirely.
I've been using a VSCode devcontainer for this. The VSCode dev container definition simply grabs the "latest" version of Rust. I happened to have an older container where autocomplete worked, and a newer one where it didn't. By taking my new project, pinning the rust version to 1.46. and rebuilding my container, I had full autocomplete again.
Rust 1.47 was release very recently. The Rust extension is 5 months old.
I've seen this today, and I fixed it by rolling back to rust 1.46. With 1.47 the autocomplete is broken. Rolling back to rust 1.46 fixed this entirely.
I've been using a VSCode devcontainer for this. The VSCode dev container definition simply grabs the "latest" version of Rust. I happened to have an older container where autocomplete worked, and a newer one where it didn't. By taking my new project, pinning the rust version to 1.46. and rebuilding my container, I had full autocomplete again.
Rust 1.47 was release very recently. The Rust extension is 5 months old.
Newbie Rustacean here... can you please give the instructions to get auto completion working in full details?
Thanks in advance.
@Twaha-Rahman if you're using Code and don't insist on using RLS, try https://marketplace.visualstudio.com/items?itemName=matklad.rust-analyzer.
I find the same problem, rustc 1.47 with vscode rust plugin 0.7.8.
I've seen this today, and I fixed it by rolling back to rust 1.46. With 1.47 the autocomplete is broken. Rolling back to rust 1.46 fixed this entirely. I've been using a VSCode devcontainer for this. The VSCode dev container definition simply grabs the "latest" version of Rust. I happened to have an older container where autocomplete worked, and a newer one where it didn't. By taking my new project, pinning the rust version to 1.46. and rebuilding my container, I had full autocomplete again. Rust 1.47 was release very recently. The Rust extension is 5 months old.
Newbie Rustacean here... can you please give the instructions to get auto completion working in full details?
Thanks in advance.
@Twaha-Rahman I'm new to Rust, so maybe there's a better solution, but this worked for me:
First, roll back to 1.46.0 and make it the default version:
rustup install 1.46.0
rustup default 1.46.0
Then, restart vscode to apply the change.
Thanks @aedeny !
I'm not sure this should be closed. The real fix is to ensure that the VS Code extension works with the latest version of Rust (i.e. the version that most developers will end up pulling, and the version that the VS Code dev containers will pull).
The roll back to 1.46 is a work around for those blocked, but is not a fix.
I suggest leaving this bug open.
alright, i'll leave it open, have we got a suggested solution though? to actually fix this bug?
This can probably be closed now, the auto-completion seems to work again with Rust 1.48.0 :-)
This can probably be closed now, the auto-completion seems to work again with Rust 1.48.0 :-)
I'll give it a shot and tell you guys how it goes.
This can probably be closed now, the auto-completion seems to work again with Rust 1.48.0 :-)
Unfortunately, the auto-completion still doesn't work. I just ran rustup update and rustup default 1.48.0 and opened VSCode to find everything broken :( No auto-completion.
Still broken for me :(
I'm still getting this issue (rustc version 1.55.0-nightly). For what it's worth, I think neither "just default to using an earlier version of Rust" nor "just use this other Rust extension instead" should be considered real solutions. This is the official Rust extension; it basic extension functionality should work out of the box. I've used matklad's extension, and it's great, but if people are in agreement that matklad's is better, then why keep this one presented in the marketplace as the recommended Rust extension?
I've used matklad's extension, and it's great, but if people are in agreement that matklad's is better, then why keep this one presented in the marketplace as the recommended Rust extension?
Because while in theory rust-analyzer will replace RLS, there hasn't been much organizational work to make that happen. The two are maintained independently, and some ownership changes will probably need to happen before anything changes.
In the meanwhile, rust-analyzer works (with the exception of proc macros on nightly, but that's a different story) and is clearly useful for a lot of people, while others don't like it because it's missing on-the-fly rustc diagnostics or other language feature gaps.
So it's fine if you don't want to use an "unofficial" extension, and it's fine to expect RLS/vscode-rust bugs to be fixed, but at some point it might be worth being more pragmatic and picking the one where autocompletion works -- at least you have the choice.
And of course, if you look at the VS Code Marketplace reviews, you'll see that the current situation is not ideal for the users.