On Windows: Shift + Alt + F
On Mac: Shift + Option + F
On Linux: Ctrl + Shift + I
Original answer How do you format code in Visual Studio Code (VSCode)?
I’m adding it here because when I was looking for it I found your post before the other one. Hope it helps.