#11Rust 开发环境配置及常见问题

lencxlencx2022/06/11

VS Code 常见问题

插件冲突

  1. Rust - The Rust Programming Language
  2. rust-analyzer - An alternative rust language server to the RLS

同时安装 1,2 两个插件则会报以下错误,关闭 1 插件即可解决。

You have both the rust-analyzer (matklad.rust-analyzer) and Rust (rust-lang.rust) plugins enabled.
These are known to conflict and cause various functions of both plugins to not work correctly.
You should disable one of them.You have both the rust-analyzer (matklad.rust-analyzer) and 
Rust (rust-lang.rust) plugins enabled. These are known to conflict and cause various functions 
of both plugins to not work correctly. You should disable one of them.

Couldn’t start client Rust Language Server

vscode 无法找到 rustup 可执行文件的路径,可以通过手动配置 settings.json 来解决。

"rust-client.rustupPath": "$HOME/.cargo/bin/rustup"

参考资料

License Copyright © 2022-present lencx