Skip to main content

Editor Integration

To get the most out of Prettier, it’s recommended to run it from your editor.

If your editor does not support Prettier, you can instead run Prettier with a file watcher.

Note! It’s important to install Prettier locally in every project, so each project gets the correct Prettier version.

Visual Studio Code

Image for: Visual Studio Code​

prettier-vscode can be installed using the extension sidebar – it’s called “Prettier - Code formatter.” Check its repository for configuration and shortcuts.

If you’d like to toggle the formatter on and off, install vscode-status-bar-format-toggle.

Emacs

Image for: Emacs​

Check out the prettier-emacs repo, or prettier.el. The package Apheleia supports multiple code formatters, including Prettier.

Vim

Image for: Vim​

vim-prettier is a Prettier-specific Vim plugin. Neoformat, ALE, and coc-prettier are multi-language Vim linter/formatter plugins that support Prettier.

For more details see the Vim setup guide.

Helix

Image for: Helix​

A formatter can be specified in your Helix language configuration, which will take precedence over any language servers.

For more details see the Helix external binary formatter configuration for Prettier.

Sublime Text

Image for: Sublime Text​

Sublime Text support is available through Package Control and the JsPrettier plug-in.

JetBrains WebStorm, PHPStorm, PyCharm...

Image for: JetBrains WebStorm, PHPStorm, PyCharm...​

See the WebStorm setup guide.

Visual Studio

Image for: Visual Studio​

Install the JavaScript Prettier extension.

Espresso

Image for: Espresso​

Espresso users can install the espresso-prettier plugin.