I can't get working autocompletion on VS Code on Ubuntu 16.04.
I've installed rustup from https://www.rustup.rs/ and installed the "rust-lang.rust" package. This extension installed rustfmt
and tried to use both stable
and nightly
toolchains.
If I type std::
no suggestions are shown. Suggestions show on local mod
import but not with the standard library. I tried to reinstall by removing via uninstall.sh
and manually removing ~/.multirust
and ~/.cargo
and then installed again, but nothing changed.
What did I do wrong?
I didn't have the RUST_SRC_PATH
variable set. In my VS Code settings, I added
"rust.rustLangSrcPath": "/home/ilya/.rustup/toolchains/**your_toolchain**/lib/rustlib/src/rust/src/"
and it did the job. This option comes from the kalitaalexey.vscode-rust
package.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.