{"repo":"withastro/prettier-plugin-astro","free":true,"listed":false,"github":"https://github.com/withastro/prettier-plugin-astro","clone":"git clone https://github.com/withastro/prettier-plugin-astro.git","description":"Prettier plugin for Astro","language":"TypeScript","stars":603,"topics":["astro","formatter","plugin","prettier"],"license":null,"category":"docs-static-sites","readme_excerpt":"Prettier Plugin for Astro Official Prettier plugin adding support for formatting .astro files. Installation First install Prettier and the plugin: Installation with pnpm Then add the plugin to your Prettier configuration: Recommended configuration For optimal compatibility with the different package managers and Prettier plugins, we recommend manually specifying the parser to use for Astro files in your Prettier config as shown in the example below: To customize formatting behavior, see the Configuration section below. Formatting with the VS Code Prettier extension directly Note The Astro VS Code extension uses Prettier and this plugin ( prettier-plugin-astro ) to format your code. You will only need to install this plugin separately for formatting if: - You are not using Astro's VS Code extension. - You want to use features of the Prettier extension that not supported by Astro's own VS Code extension, such as the toolbar panel showing Prettier's status. Install the VS Code Prettier extension and add the following settings to your VS Code configuration: The settings above ensure that VS Code is aware that Prettier can be used for Astro files, and sets Prettier as the default formatter for Astro files. Reporting issues When submitting issues about formatting your .astro files in VS Code, please specify which extension you are using to format your files: Astro's own extension or the Prettier extension. Configuration Most options from Prettier will work with the plugin and can b","default_branch":null,"files":null,"tree":[],"storefront":"/r/withastro","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/withastro/prettier-plugin-astro/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}