Showing posts with label Visual Studio Code. Show all posts
Showing posts with label Visual Studio Code. Show all posts

Wednesday, April 7, 2021

Why does Prettier not format code in VS Code?

I was trying to set up Prettier in my VS Code and not sure why it does not format code. After googling I found the fix.

1. Goto "VS Code > View > Command Palette".

2. Search for "Format Document With".

3. Click on "Configure Default Formatter".

4. Click on "Prettier - Code Formatter".

I had recommended "Indent Rainbow" on my previous blog on "What is your first VS Code plugin?". Well, this plugin is not that useful if you have Prettier. Prettier already indent your code and I don't need indent colour.

Tuesday, December 24, 2019

What is your first VS Code plugin?

Prettier enforces a consistent code style.



Other favourite plugins:

  1. Bracket Pair Colorizer
  2. Indent Rainbow
  3. Auto Rename Tag
What is your first VS Code plugin? Comment below.