Formatting support for mongodb playground files.
There's no way that I can find to format the code in a .mongodb playground file.
At present, I need to manually change the file suffix to js, then use a hot-key to run prettier, then rename it back.
If there is a better way, I'd love to know it!
Thanks for the tip @Massimiliano.
I think most folks are working with Prettier these days.
It might be best to try to look in that direction.
AdminMassimiliano (Admin, MongoDB) commented
Right now we don't have a built-in formatter. However, there is a workaround: with the beautify extension (https://marketplace.visualstudio.com/items?itemName=HookyQR.beautify) you can format the file without changing the file extension (Cmd/Ctrl + Shift + P > Beautify file > JS).