Disable cargo-related functionality in rust-analyzer

397 Views Asked by At

If I don't want to use cargo for some reasons, I have the error: could not find 'Cargo.toml'. Is there any way to disable all Cargo.toml-related functionality?

I tried this:

{
    "cargo": {
        "noSysroot": true,
        "sysroot": "",
        "autoreload": false,
        "buildScripts": { "enable": false }
    }
}

But this didn't help.

1

There are 1 best solutions below

0
On

To use rust-analyzer with single files, please check out https://github.com/rust-lang/rust-analyzer/pull/8955. For larger projects that don't use Cargo, you won't be able to use rust-analyzer at the moment as per this comment.