The Prettier VS Code extension runs the Prettier formatter inside editors, respecting project config files and exposing Prettier and editor-specific formatting settings.
Overview
Prettier for Visual Studio Code integrates the Prettier code formatter as a built-in document formatter for supported languages. When a workspace contains a Prettier configuration, the extension defers to those project rules; otherwise it falls back to extension settings that mirror Prettier defaults.
Users can enable or disable formatting globally, require a config file before formatting, point to custom Prettier installations, register extra document selectors, and tune language-specific overrides inside VS Code settings.json.
The extension resolves local node_modules Prettier builds when available, with optional global module resolution, and documents troubleshooting for missing plugins, performance on network drives, and untrusted workspace restrictions.
It ships as an open-source Microsoft extension maintained alongside the core Prettier project.
Key features
- Editor-integrated formatting
- Project Prettier config detection
- Language-specific overrides
- Custom Prettier binary path
- Document selector globs
- EditorConfig integration
- Untrusted workspace safeguards
Use cases
- Consistent team formatting in VS Code
- Multi-language Prettier defaults
- Formatting without manual CLI runs