Customize your code editor to improve the Astro developer experience and unlock new features.
VS Code is a popular code editor for web developers, built by Microsoft. The VS Code engine also powers popular in-browser code editors like GitHub Codespaces and Gitpod.
Astro works with any code editor. However, VS Code is our recommended editor for Astro projects. We maintain an official Astro VS Code Extension that unlocks several key features and developer experience improvements for Astro projects.
.astro
files..astro
files.To get started, install the Astro VS Code Extension today.
📚 See how to set up TypeScript in your Astro project.
Initial support for Astro landed in WebStorm 2023.1. You can install the official plugin through JetBrains Marketplace or by searching for “Astro” in the IDE’s Plugins tab. This plugin includes features like syntax highlighting, code completion, and formatting, and plans to add even more advanced features in the future. It is also available to all other JetBrains IDEs with JavaScript support.
JetBrains’ upcoming Fleet IDE includes language server support and will be able to use the official Astro tooling.
Our amazing community maintains several extensions for other popular editors, including:
In addition to local editors, Astro also runs well on in-browser hosted editors, including:
.astro
files. No installation or configuration required!ESLint is a popular linter for JavaScript and JSX. For Astro support, a community maintained plugin can be installed.
See the project’s User Guide for more information on how to install and set up ESLint for your project.
Stylelint is a popular linter for CSS. A community maintained Stylelint configuration provides Astro support.
Installation instructions, editor integration, and additional information can be found in the project’s README.
Prettier is a popular formatter for JavaScript, HTML, CSS, and more. If you’re using the Astro VS Code Extension or the Astro language server within another editor, code formatting with Prettier is included.
To add support for formatting .astro
files outside of the editor (e.g. CLI) or inside editors that don’t support our editor tooling, install the official Astro Prettier plugin.
To get started, first install Prettier and the plugin:
Prettier will then automatically detect the plugin and use it to process .astro
files when you run it:
See the Prettier plugin’s README for more information about its supported options, how to set up Prettier inside VS Code, and more.
© 2021 Fred K. Schott
Licensed under the MIT License.
https://docs.astro.build/en/editor-setup/