I have install the rust-analyzer on vscode and use cargo new hello to create a simple workplace, in the hello directory, I run the command code . and Vscode launches but rust-analyzer doesn't do anything inlucding intellisense, code completion etc. But there is NO error message at the bottom tool bar for rust-analyzer.
Besides, I have another M1 Macbook air, which has no problem for rust-analyzer, I double checked many times of the configuration between two computers, I didn't see any thing weird.
I searched the issue list in Github and I see the similar one is #12547, I tried to follow the discussion till analysis-stats outputs, in the hello folder I have run the following commands
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "hello"
version = "0.1.0"
The Cargo.toml contents
[package]
name = "hello"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
However on the Macbook air (the correct working one), the commands outputs are
It's very strange that in the problematic one, the crates are not detected by rust-analyzer, because of the following line
crates: 0, mods: 0, decls: 0, fns: 0
I have reinstalled the extension (uninstall it from Vscode extension page and delete the ~/.vscode/extensions/rust-lang.rust-analyzer-0.3.1285-darwin-arm64 folder), reinstall the rust itself via rustup self uninstall but doesn't solve the problem.
Because my projects located in ~/Work/Rust/, the path was ~/work/rust/, I changed the first letter to capital letter, I think this should not be a problem, Macos is case-insensitive, even it doesn't, the hello project is just a new created project under new path name, so I have totally no idea... anyone can help? Thanks!
OS: Macos CPU: M1 Max Rustc version: rustc 1.65.0 (897e37553 2022-11-02) Cargo version: cargo 1.65.0 (4bc8f24d3 2022-10-20) rust-analyzer version: 0.3.1285-standalone (45ec315e0 2022-11-11) Vscode version: 1.73.1
I have install the rust-analyzer on vscode and use
cargo new hello
to create a simple workplace, in thehello
directory, I run the commandcode .
and Vscode launches but rust-analyzer doesn't do anything inlucding intellisense, code completion etc. But there is NO error message at the bottom tool bar for rust-analyzer.Besides, I have another M1 Macbook air, which has no problem for rust-analyzer, I double checked many times of the configuration between two computers, I didn't see any thing weird.
I searched the issue list in Github and I see the similar one is #12547, I tried to follow the discussion till
analysis-stats
outputs, in thehello
folder I have run the following commandsthe outputs are
The
Cargo.lock
contentsThe
Cargo.toml
contentsHowever on the Macbook air (the correct working one), the commands outputs are
It's very strange that in the problematic one, the crates are not detected by rust-analyzer, because of the following line
I have reinstalled the extension (uninstall it from Vscode extension page and delete the
~/.vscode/extensions/rust-lang.rust-analyzer-0.3.1285-darwin-arm64
folder), reinstall the rust itself viarustup self uninstall
but doesn't solve the problem.Because my projects located in
~/Work/Rust/
, the path was~/work/rust/
, I changed the first letter to capital letter, I think this should not be a problem, Macos is case-insensitive, even it doesn't, thehello
project is just a new created project under new path name, so I have totally no idea... anyone can help? Thanks!