Skip to content
Discussion options

You must be logged in to vote

The program is cargo and the first arg is fmt so you would specify the formatter as this instead:

formatter = { command = "cargo", args = ["fmt"] }

cargo-fmt does not support reading files from stdin and printing the formatted versions to stdout which is what formatter programs are expected to do. You should be able to delete that line since rust-analyzer should take care of formatting on write. If formatting is currently working even though the formatter program is marked as "not found in PATH" then rust-analyzer is already being used for formatting.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@andreacfromtheapp
Comment options

@andreacfromtheapp
Comment options

@andreacfromtheapp
Comment options

Answer selected by andreacfromtheapp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #14000 on July 19, 2025 20:36.