Closed TENX-S closed 2 years ago
Can't reproduce.
cd /tmp
cargo new a1 && cd a1
nvim src/main.rs
Set "rust-analyzer.trace.server": "verbose"
in your coc-settings.json, reproduce your issue and check :CocCommand workspace.showOutput rust-analyzer
[ERROR flycheck] Flycheck failed to run the following command: "cargo" "fmt" "--workspace" "--message-format=json" "--manifest-path" "/private/tmp/a1/Cargo.toml" "--all-targets"
[ERROR rust_analyzer::lsp_utils] cargo check failed
Cargo watcher failed, the command produced no valid metadata (exit code: ExitStatus(unix_wait_status(256))):
error: Found argument '--workspace' which wasn't expected, or isn't valid in this context
--workspace
was unexpected.
Whoops. https://github.com/rust-lang/rust-analyzer/issues/6589#issuecomment-1094132030 comment this line works for me, anything wrong about it?
"rust-analyzer.checkOnSave.command": "fmt",
I don't think you can use fmt
as checkOnSave command.
Alright.
What's the output of
:CocInfo
What's the output of
:CocCommand rust-analyzer.serverVersion
rust-analyzer 0.0.0 (75b22326d 2022-07-03)
macOS 12.4