1

I have the latest version of prettier on macos with latest vs code, but I still see 2 spaces on new tabs when I Format Document. This is a React/NextJS JSX document (also does with CSS).

enter image description here

In the VS Code Prettier settings, I have the tabs set as true and the spaces set at 4. I am not sure how to adjust this as I don't want the 2 lines as they appear to close together for me to see. How do I adjust this?

EDIT [SOLVED]:

The issue was that the page in VS needed to be closed and opened again after the changes. The pages got stuck. Thanks for the tips. I also used the previous SO answer to setup the proper settings prior to this post.

rioV8
  • 24,506
  • 3
  • 32
  • 49
cdub
  • 24,555
  • 57
  • 174
  • 303

2 Answers2

1

simple, you need change settings

File -> Preferences -> Settings -> search for: "Prettier:Tab Width" -> change value to 4
Andrew
  • 19
  • 2
0

In the footer of VS Code there is an option to change your indents. It's next to the current cursor location. I don't know if that's what you're looking for.

VS Code Footer

Julius Babies
  • 955
  • 3
  • 6
  • 22
  • 1
    Thanks, I need to close the page and reopen it for it to take affect. Great tip about the footer. – cdub Jul 14 '22 at 07:24