Follow these steps:

  1. CTRL + SHIFT + P
  2. Format Document (in pop-up bar)
  3. Select Format Document
  4. Select Configure Default Formatter...
  5. Select Prettier - Code formatter

Done!

Answer from Goku on Stack Overflow
🌐
Reddit
reddit.com › r/rust › vscode format on save doesn't work
r/rust on Reddit: VSCode format on save doesn't work
November 22, 2024 -

Hi everyone,

For the last few months the FormatOnSave feature stopped working for me.

I have editor.formatOnSave = true in my settings.json but whenever I save *.rs file nothing happens. It was working before but at some point stopped to.

Does anyone have a similar issue? Is this VSCode problem or is something probably wrong with my settings?

Thanks

Discussions

Format on Save (prettier) stopped working with latest update
Format on Save (prettier) stopped working with the latest update Multiple time reinstalled Prettier, and checked the settings, it happened right after the update of VSCode. https://gyazo.com/f07a3b... More on github.com
🌐 github.com
86
October 10, 2020
Prettier extension's format-on-save doesn't work anymore
Any idea how to fix? The inserted code is often badly indented and I don’t know about others but my personal ability to wrap my head around badly indented code is practically zero. Here is the snippet from my .vscode/settings.json and I usually have a custom one in every project. More on forum.cursor.com
🌐 forum.cursor.com
1
December 26, 2024
Format on Save (Black) stopped working with latest update
VS Code Version: Version: 1.98.0 (Universal) OS Version: MacOS Sequoia 15.3.1 After installing the latest update, I noticed that neither my linter (flake8) nor my formatter (black) worked within VS code (meanwhile the command line functi... More on github.com
🌐 github.com
9
March 6, 2025
For the life of me, I cannot get VSCode to format my code like it used to. Please help. I am losing my mind.
Did you have your settings synced before the reinstall? If yes, did you restore them afterwards? More on reddit.com
🌐 r/vscode
12
27
March 17, 2023
🌐
GitHub
github.com › prettier › prettier-vscode › issues › 3382
I have done all kinds of things but my prettier does not format on save. · Issue #3382 · prettier/prettier-vscode
April 26, 2024 - Type: Bug I installed prettier, on user I checked format on save and checked the config. Well it does not format on save I have followed all kinds of videos but it doesnot work. I think I did something wrong with the path. I even tried t...
Author   Tochiskool
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-format-code-with-prettier-in-visual-studio-code
Format Code with Prettier in Visual Studio Code: Setup Guide | DigitalOcean
August 1, 2025 - You can apply this setting globally or in a workspace-specific .vscode/settings.json file. Prettier supports a wide range of file types out of the box, including: ... Prettier can be configured to automatically format any of these file types on save, provided the file extension is recognized and the formatter is correctly assigned in your VS Code settings. There are several possible reasons why Prettier is not ...
🌐
GitHub
github.com › microsoft › vscode › issues › 108447
Format on Save (prettier) stopped working with latest update · Issue #108447 · microsoft/vscode
October 10, 2020 - Format on Save (prettier) stopped working with the latest update Multiple time reinstalled Prettier, and checked the settings, it happened right after the update of VSCode. https://gyazo.com/f07a3b...
Author   ivanjeremic
🌐
DigitalOcean
digitalocean.com › community › tutorials › linting-and-formatting-with-eslint-in-vs-code
How To Lint and Format Code with ESLint in Visual Studio Code | DigitalOcean
4 days ago - In this setup, ESLint enforces code quality rules while delegating formatting concerns to Prettier, and VS Code can still trigger all fixes on save through the ESLint extension. If ESLint is not reporting problems in Visual Studio Code, first confirm that the ESLint extension is installed and enabled, then check that your workspace includes a configuration file such as .eslintrc.json or eslint.config.js.
🌐
It's FOSS
itsfoss.com › vs-code-auto-format-code
Automatically Format Code On File Save in Visual Studio Code
May 18, 2025 - To do that, open the Command Palette again and run “Save Without Formatting.” · Prettier works well out of the box, but you can customize how it formats your code by adding a .prettierrc configuration file at the root of your project.
Find elsewhere
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
Prettier - Code formatter - Visual Studio Marketplace
January 21, 2026 - Extension for Visual Studio Code - Code formatter using prettier
🌐
Cursor
forum.cursor.com › support › bug reports
Prettier extension's format-on-save doesn't work anymore - Bug Reports - Cursor - Community Forum
December 26, 2024 - Any idea how to fix? The inserted code is often badly indented and I don’t know about others but my personal ability to wrap my head around badly indented code is practically zero. Here is the snippet from my .vscode/se…
🌐
TrueQ
trueq.io › q › 32
VSCode - Prettier does not format on save - TrueQ
October 14, 2020 - I just ran into the problem, that I also have another AutoFormatter Extension installed for VS Code which didn't work because I specified prettier as defaultFormatter. I could resolve it with overriding the defaultFormatter for the specific filetype where I want to use the other Extension for formatting: { ... "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode", "[prisma]": { "editor.defaultFormatter": "Prisma.prisma" } }Copy
🌐
GitHub
github.com › microsoft › vscode › issues › 242811
Format on Save (Black) stopped working with latest update · Issue #242811 · microsoft/vscode
March 6, 2025 - After installing the latest update, I noticed that neither my linter (flake8) nor my formatter (black) worked within VS code (meanwhile the command line functionality was fine, so this is an issue with VS code, not my global installations). I found this related issue #108447 and I found a partial solution: my default formatter had been set to Null after the update, and once I corrected this, python black works again within VS code.
Author   aphearin
🌐
Visual Studio Code
code.visualstudio.com › docs › editing › codebasics
Basic editing
November 3, 2021 - Set the file encoding globally ... the file encoding in the status bar. Click on the encoding button in the status bar to reopen or save the active file with a different encoding....
🌐
Reddit
reddit.com › r/vscode › for the life of me, i cannot get vscode to format my code like it used to. please help. i am losing my mind.
For the life of me, I cannot get VSCode to format my code ...
March 17, 2023 -

For the life of me, I cannot get VSCode to format my code like it used to. Please help. I am losing my mind.


I've googled and come up empty.

I've tried:

  • Reinstalling

  • Enable/disable various extensions

  • Went through ALL format settings suggested (default formatter, etc)

  • (This includes format on save, etc)

My code is in C#.

It worked perfectly fine until I had to refresh windows due to a separate issue. It removed all of my programs installed on C: and I had to reinstall VSCode. Since then, whenever I save, NOTHING gets formatted. It is a pain in the ass to format without it. Please help.

Edit: Reinstalled .NET, now C# formatter works but Prettier does not.. at least it's something, I guess?

An accurate depiction of my mental state.

EDIT: Came back to VS code randomly, without updating, and it resolves itself.

I am sorry, this is clearly a 'knowledge of the ancients' situation. If you got here via google, I am afraid I cannot help you.

🌐
Yogesh Chavan
blog.yogeshchavan.dev › automatically-format-code-on-file-save-in-visual-studio-code-using-prettier
Automatically Format Code On File Save in Visual Studio Code Using Pre
November 5, 2021 - ... Press Control + Shift + P or Command + Shift + P (Mac) to open the command palette and type format document and then select Format Document option. Then you will be asked to select the default formatter ...
🌐
GitHub
github.com › microsoft › vscode › issues › 272039
Format on save is not working · Issue #272039 · microsoft/vscode
October 18, 2025 - Type: Bug Installed prettier as formatter Turned on "format on save" in both User and Workspace Manually formatting the file works But Manually saving the file won't trigger the formatting VS Code version: Code 1.105.0 (03c265b, 2025-10-...
Author   jzbuaa
🌐
DEV Community
dev.to › dmytrych › fixing-prettier-not-working-with-vscode-44ml
Fixing Prettier not working with VSCode - DEV Community
June 9, 2023 - Also, check that your file extension is spelled correctly. Also, make sure that the settings correspond to the programming language you are using. Try disabling other VSCode extensions.
🌐
SheCodes
shecodes.io › athena › 8760-troubleshooting-prettier-formatter-not-working-after-restarting-vs-code
[VS Code] - Troubleshooting Prettier Formatter Not Working After Restarting VS Code
Learn how to resolve the issue of Prettier formatter not working even after restarting Visual Studio Code with these troubleshooting tips. ... when I try to use Visual Studio Vode, I save my index.html, and when I click twice, and I type my code, nothing appears on my index.html, anyone knows why?