Add this code snippet to your settings.json file:
"prettier.documentSelectors": ["**/*.astro"],
"[astro]": {
"editor.defaultFormatter": "astro-build.astro-vscode"
},
"editor.formatOnSave": true
On this page of the site you can watch the video online Astro Tutorial: Add Format On Save for Astro Projects (2023) with a duration of hours minute second in good quality, which was uploaded by the user Anthony Ngo 15 September 2023, share the link with friends and acquaintances, this video has already been watched 2,952 times on youtube and it was liked by 120 viewers. Enjoy your viewing!