Vscode rustfmt stopped working

I'm using the latest rust-analyzer extension and everytime I hit save, it used to reformat my code for me. But now it stopped working and I can't tell why. I have the following in my settings:

    "editor.formatOnSave": true,
    "editor.defaultFormatter": "matklad.rust-analyzer",
    "[rust]": {
        "editor.defaultFormatter": "matklad.rust-analyzer",
        "editor.formatOnSave": true

And my rustfmt is located at ~/.cargo/bin/rustfmt which is the default location that the extension looks for it. So I'm very confused.

Change matklad.rust-anyzer to rust-lang.rust-analyzer and see if that works. The extension was renamed recently.


That was it! Brilliant!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.