Files
test-repo/website/versioned_docs/version-stable/editors.md
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
2.3 KiB
Markdown
Raw Normal View History

---
id: editors
title: Editor Integration
---
2020-07-01 08:44:21 +02:00
To get the most out of Prettier, it’s recommended to run it from your editor.
2020-07-01 08:44:21 +02:00
If your editor does not support Prettier, you can instead [run Prettier with a file watcher](watching-files.md).
2020-07-01 08:44:21 +02:00
**Note!** It’s important to [install](install.md) Prettier locally in every project, so each project gets the correct Prettier version.
## Visual Studio Code
2020-07-01 08:44:21 +02:00
`prettier-vscode` can be installed using the extension sidebar – it’s called “Prettier - Code formatter.” [Check its repository for configuration and shortcuts](https://github.com/prettier/prettier-vscode).
2020-07-01 08:44:21 +02:00
If you’d like to toggle the formatter on and off, install [`vscode-status-bar-format-toggle`](https://marketplace.visualstudio.com/items?itemName=tombonnike.vscode-status-bar-format-toggle).
2020-07-01 08:44:21 +02:00
## Emacs
2020-08-24 20:24:48 +09:00
Check out the [prettier-emacs](https://github.com/prettier/prettier-emacs) repo, or [prettier.el](https://github.com/jscheid/prettier.el). The package [Apheleia](https://github.com/raxod502/apheleia) supports multiple code formatters, including Prettier.
2020-07-01 08:44:21 +02:00
## Vim
[vim-prettier](https://github.com/prettier/vim-prettier) is a Prettier-specific Vim plugin. [Neoformat](https://github.com/sbdchd/neoformat), [ALE](https://github.com/w0rp/ale), and [coc-prettier](https://github.com/neoclide/coc-prettier) are multi-language Vim linter/formatter plugins that support Prettier.
For more details see [the Vim setup guide](vim.md).
2023-07-05 21:41:09 +09:00
## Helix
A formatter can be specified in your [Helix language configuration](https://docs.helix-editor.com/languages.html#language-configuration), which will take precedence over any language servers.
2024-06-02 02:01:15 +09:00
For more details see the [Helix external binary formatter configuration for Prettier](https://github.com/helix-editor/helix/wiki/External-formatter-configuration#prettier).
2023-07-05 21:41:09 +09:00
## Sublime Text
Sublime Text support is available through Package Control and the [JsPrettier](https://packagecontrol.io/packages/JsPrettier) plug-in.
## JetBrains WebStorm, PHPStorm, PyCharm...
See the [WebStorm setup guide](webstorm.md).
2020-07-01 08:44:21 +02:00
## Visual Studio
Install the [JavaScript Prettier extension](https://github.com/madskristensen/JavaScriptPrettier).
## Espresso
Espresso users can install the [espresso-prettier](https://github.com/eablokker/espresso-prettier) plugin.