With the extension Prettier-Code Formatter installed, set "editor.defaultFormatter": "esbenp.prettier-vscode" in User Settings.json. Reload the window, then open command palette, choose format document with, you would see prettier there. Try this and see if it solves your question. Answer from Molly_Wang on reddit.com
🌐
Reddit
reddit.com › r/vscode › why my vs code pettier not working ?
r/vscode on Reddit: Why my VS code pettier not working ?
March 13, 2021 -

I have been searching google for several hours.

Many user have similar problem with me. https://stackoverflow.com/questions/52586965/why-does-prettier-does-not-format-code-in-vs-code/64273353#64273353

But none of the solution works for me.

https://imgur.com/2ssn1Vt

I have prettier installed. And I have tried the following

1.Command + Shift + p

2.type format document with

3.select Configure Default Formatter...

https://imgur.com/xw5oYvS

Then I cant select Prettier as default.

I only give me Python(default) as the only option.

I have a setting.json inside my root. Is it related?

https://imgur.com/KbEdsOV

🌐
Reddit
reddit.com › r/vscode › prettier not working as intended? (html formatting)
r/vscode on Reddit: Prettier not working as intended? (HTML formatting)
July 31, 2024 -

So, I'm starting to learn web dev, I'm at HTML right now, and using Linux.

The problem I'm having, is no matter what I tinker with in Prettier's settings, the formatting does behaviors I don't like, that mess with my ability to check visually and compare with the video tutorial (2022) I'm using, just a single line break being added or deleted makes it look like everything and anything could be different from the source video.

These behaviors include:

  1. Deleting line break before <head> and after </body> tags.

  2. Indenting head and body tags, instead of just their contents.

  3. Adding a line break inside a <li> element and indenting it because it contains a phrase having <a> and <abbr> tags, the closing </abbr> also gets a line break right before the '>' (apparently abbr tag is "breaking" because it has a period right after). 🤦🤦🤦

I have set set the Print Width to 600 but it doesn't fix the 3rd problem.

Is there a VS Code feature that's just limited to adding indentation on format without messing with anything else? I'd like to know if there are fixes without having to disable Prettier if possible, but this is so ridiculous I may as well stop using it.

🌐
Reddit
reddit.com › r/vscode › prettier not formatting css
r/vscode on Reddit: Prettier not formatting css
September 24, 2024 -

Hey everyone, for the life of me I can't figure out why prettier won't format css. I have gone over all of my setting, format on save, setting prettier as the default format, and checked the setting.json file. Still can't figure out what is going on. Any help would be appreciated!

🌐
Reddit
reddit.com › r/vscode › prettier extension not working on html files
r/vscode on Reddit: Prettier extension not working on HTML files
January 29, 2022 -

I have Prettier setup as the default formatter already and it's working fine for JSX and JS files.

The weird thing is that it works on save, so when I save it formats HTML correctly, but if I try to do it manually I get: "Extension 'Prettier - Code formatter' is configured as formatter but it cannot format 'HTML'-files".

Find elsewhere
🌐
Reddit
reddit.com › r/vscode › suddenly prettier has stopped working with vscode?
r/vscode on Reddit: Suddenly prettier has stopped working with vscode?
February 24, 2023 -

Hello, I really need help, prettier just stopped working with react for no reason, as you can see it works with json files, but not react. What could be the reason? here is my settings.json:

{
  "editor.bracketPairColorization.enabled": true,
  "editor.accessibilitySupport": "off",
  "editor.formatOnSave": true,
  "typescript.updateImportsOnFileMove.enabled": "always",
  "editor.inlineSuggest.enabled": true,
  "github.copilot.enable": {
    "*": true,
    "yaml": false,
    "plaintext": true,
    "markdown": true
  },
  "window.zoomLevel": -2,
  "github.copilot.advanced": {},
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.formatOnPaste": true,
  "[typescriptreact]": {
    "editor.defaultFormatter": "vscode.typescript-language-features"
  },
}

How can it suddenly stop working?

🌐
Reddit
reddit.com › r/vscode › prettier stopped working suddenly and command "format document with" not found in command palette
r/vscode on Reddit: Prettier stopped working suddenly and Command "Format Document with" not found in Command Palette
May 11, 2021 - Prettier just suddenly stopped working and complained "Extension 'Prettier - Code Formatter' cannot format xxxx". A lot of the solutions online point to configuring default code formatter via the "Format Document with" in Command Palette instead of "Preference > Setting" but there is not any "Format Document with" command at all, just "Format Document". Any advice? I also tried clean uninstall vscode (deleting the extension files and everything) to no avail.
🌐
Reddit
reddit.com › r/vscode › problem with prettier - code formatter
r/vscode on Reddit: problem with prettier - code formatter
August 21, 2022 -

I have a problem with prettier - code formatter

I installed prettier, it shows up in extensions, but when trying to use the extension in visual studio code, I can't use it.

I leave these images so you can see my problem and if you can help, I would greatly appreciate it.

🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 5779539 › prettier-extension-not-working-in-visual-studio-co
prettier extension not working in Visual Studio Code - Microsoft Q&A
Right-Click inside the file and select Format Document, then choose Prettier if prompted. Restart Visual Studio Code after making the changes.
🌐
Reddit
reddit.com › r/webdev › vs code: prettier extension not working
r/webdev on Reddit: VS Code: Prettier extension not working
August 29, 2023 -

I'm new to VS Code, and have just installed the Prettier extension so that my HTML / CSS is formatted neatly.

I've installed it, and set it as the default formatter... but still its not doing anything whenever I hit save?

🌐
Reddit
reddit.com › r/vscode › prettier not working
r/vscode on Reddit: prettier not working
April 13, 2024 - ["INFO" - 9:50:21 PM] Extension Name: esbenp.prettier-vscode.
🌐
Reddit
reddit.com › r/vscode › prettier extension not working
r/vscode on Reddit: Prettier extension not working
August 17, 2022 -

I'm new to VS Code, and have just installed the Prettier extension so that my HTML / CSS is formatted neatly.

I've installed it, and set it as the default formatter... but still its not doing anything whenever I hit save?

🌐
Reddit
reddit.com › r/vscode › i have a problem to use prettier in vscode
r/vscode on Reddit: i have a problem to use prettier in vscode
September 11, 2022 - I installed prettier, it shows up in extensions, but when trying to use the extension in visual studio code, I can't use it. I leave these images so you can see my problem and if you can help, I would greatly appreciate it. ... As others have pointed out Prettier doesn't work for python. There may be a plugin for it in the community that would make it work but not sure and might just be easier to use an extension that is specifically for python. ... What vscode theme is this?
🌐
Reddit
reddit.com › r/javascript › [askjs] autoformatting issue with prettier and vscode
r/javascript on Reddit: [AskJS] Autoformatting issue with prettier and vscode
March 28, 2025 -

Hello, I am banging my head against a wall.

For long I had no autoformatting enabled in Vscode, when eslint (or prettier - I use the eslint prettier package) complained about some styling formatting I hovered over the error and clicked "Fix all problems" in Vscode.

But then I thought I finally need to setup the fix/format on save thingy… I enabled format on save in vscode settings And added this in my settings json in my project:

"editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.fixAll.eslint": true },

And it works!

But it seems I have some conflicting rules or stuff. Because I have something like this: some function => {} and when I hit save it formats to add a whitespace inside the curly braces: some function => { }

And here begins my problem. With the space I get an eslint error to remove the whitespace but when saving it adds it again. I am basically stuck lol

I tried to revert the settings in vscode but it keeps happening and I have no idea where to look for to fix this issue?

I will really appreciate any help or hints.

🌐
Reddit
reddit.com › r/vscode › i can't figure out why prettier keeps overriding my settings in vscode
r/vscode on Reddit: I can't figure out why Prettier keeps overriding my settings in VSCode
January 25, 2024 -

Hi, I decided to use Prettier with VSCode and I'm having some problems. Just a heads up, I don't know much about JSON files, so that's probably where my issue lies.

I changed Prettier settings in VSCode to use tabs instead of spaces and to make tab width 4.

I added this to VSCode's settings.json:

"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"prettier.tabWidth": 4,
"prettier.useTabs": true

I also created a .prettierrc file with these contents:

{
	"useTabs": true,
	"tabWidth": 4,
}

And STILL, whenever I start a new project (I'm using React with Vite, if that is relevant) it defaults to indenting by two spaces until I change it manually in the bottom bar. I'm at wit's end with this, can somebody please help.

🌐
Reddit
reddit.com › r/vscode › trouble with prettier
r/vscode on Reddit: Trouble with Prettier
October 13, 2020 -

Guys, anybody got any experience with Prettier not working on VS Code? I've pretty much tried every solution online, including uninstalling and reinstalling Prettier and VS Code itself. I've also cleared a lot of cache as recommended somewhere and nothing changed. Prettier appears enabled and with all the correct settings activated. Any help greatly appreciated!