如题。
比如我手动新建了一个 box 文件夹,然后 cd box。
再执行 cargo new 命令新建一个 rust 项目。
rust-analyzer 就用不了。
提示我 rust-analyzer failed to discover workspace。
是我设置的不对嘛?
机器是 centos 8
1
共 3 条评论, 1 页
如题。
比如我手动新建了一个 box 文件夹,然后 cd box。
再执行 cargo new 命令新建一个 rust 项目。
rust-analyzer 就用不了。
提示我 rust-analyzer failed to discover workspace。
是我设置的不对嘛?
机器是 centos 8
评论区
写评论vscode 填写rust-analyzer 配置,指向需要解析的cargo.toml 的文件夹就好了
refer to https://users.rust-lang.org/t/rust-analyzer-failed-to-discover-workspace/47457/4
原来是这样,学习了,谢谢。
--
👇
gwy15: 这不是很正常的吗,RA 在根目录下找 Cargo.toml,找不到铁定报错啊。
你要解决两个方法,
Refer: [1] https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html
这不是很正常的吗,RA 在根目录下找 Cargo.toml,找不到铁定报错啊。
你要解决两个方法,
Refer: [1] https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html