I set up the VS Code settings.json with the following configuration:
{
"rust-analyzer.checkOnSave": true,
"rust-analyzer.runnables.extraEnv": {
"RUST_BACKTRACE": "0"
},
"rust-analyzer.cargo.targetDir": true,
// "rust-analyzer.check.command": "clippy",
"rust-analyzer.check.overrideCommand": [
"cargo-clif",
"check",
"--workspace",
"--message-format=json",
"--all-targets"
]
}
This works, but when I run watchexec -- cargo-clif run on the project (it's a web server) to restart it on each change in the codebase, it stops with the following message:
Blocking waiting for file lock on build directory
If I use:
"rust-analyzer.check.command": "clippy",
it doesn't block.
How can I make cargo-clif check works in its own directory?