Hi. Sorry if this is off-topic b/c it's not a Rust question. I'm at my wit's end with this.
Inside VSCode, rust-analyzer is trying to interpret some of my .toml files as .rs files. And, as you'd expect, finding hundreds of syntax errors in every .toml file. cargo from the command line does everything as I would expect and shows no errors when building the project.
cargo check --workspace --all-targets also shows no errors whatsoever.
You'd think the internet would have a lot to say about such a fundamental issue, but I've found absolutely nothing relevant. That's why I'm here.
This started when I migrated from the old "Rust" VSCode extension to the "rust-analyzer" extension. I lived with it for a few months thinking a newer version of something would fix it. But after 6 months it's getting really frustrating.
I've reinstalled vscode. Reinstalled rust-analyzer, deleted just about every preference and config I know about.
My versions are:
rustup -V rustup 1.25.2 (fae52a197 2023-02-01) info: This is the version for the rustup toolchain manager, not the rustc compiler. info: The currently active `rustc` version is `rustc 1.67.1 (d5a82bbd2 2023-02-07)` cargo -V cargo 1.67.1 (8ecd4f20a 2023-01-10)
Version: 1.75.1 (Universal) Commit: 441438abd1ac652551dbe4d408dfcec8a499b8bf Date: 2023-02-08T21:34:59.000Z Electron: 19.1.9 Chromium: 102.0.5005.194 Node.js: 16.14.2 V8: 10.2.154.23-electron.0 OS: Darwin x64 21.6.0 Sandboxed: No
Another clue is that the one .toml file that it isn't complaining about is the workspace toml. That looks like this:
[workspace] resolver = "2" default-members = ["projectd"] members = [ #Main "projectd", #Sub-Crates "subs/evidence_store", "subs/connection_doorguy", "subs/project_common", ]
Does anyone have an inkling where to look next? Thanks for any suggestions.