Just run Format JSON
to set the language of the current
file to JSON and format the content in one step.
Also works in new Untitled (not saved) files.
Before I always did
Cmd + K
and thenM
to complete the command- Type JSON
- Hit Enter
Option + Shift + F
to format the content
Now it is just Cmd + Shift + P
and then Format JSON
.