Prettierd Format
Sublime Text plugin to format files faster using prettierd
Details
Installs
- Total 18K
- Win 9K
- Mac 5K
- Linux 3K
| Mar 19 | Mar 18 | Mar 17 | Mar 16 | Mar 15 | Mar 14 | Mar 13 | Mar 12 | Mar 11 | Mar 10 | Mar 9 | Mar 8 | Mar 7 | Mar 6 | Mar 5 | Mar 4 | Mar 3 | Mar 2 | Mar 1 | Feb 28 | Feb 27 | Feb 26 | Feb 25 | Feb 24 | Feb 23 | Feb 22 | Feb 21 | Feb 20 | Feb 19 | Feb 18 | Feb 17 | Feb 16 | Feb 15 | Feb 14 | Feb 13 | Feb 12 | Feb 11 | Feb 10 | Feb 9 | Feb 8 | Feb 7 | Feb 6 | Feb 5 | Feb 4 | Feb 3 | Feb 2 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 0 | 11 | 11 | 10 | 10 | 6 | 10 | 11 | 13 | 7 | 11 | 4 | 2 | 12 | 7 | 12 | 6 | 9 | 3 | 9 | 3 | 5 | 6 | 13 | 5 | 4 | 3 | 2 | 13 | 8 | 12 | 5 | 1 | 4 | 6 | 7 | 13 | 12 | 6 | 4 | 7 | 11 | 1 | 10 | 14 | 16 |
| Mac | 0 | 9 | 5 | 13 | 4 | 3 | 7 | 5 | 4 | 3 | 12 | 1 | 8 | 7 | 11 | 8 | 5 | 4 | 4 | 6 | 6 | 11 | 11 | 4 | 6 | 4 | 2 | 4 | 7 | 8 | 8 | 10 | 2 | 1 | 6 | 6 | 6 | 12 | 6 | 1 | 3 | 8 | 6 | 7 | 10 | 7 |
| Linux | 0 | 4 | 5 | 5 | 2 | 3 | 6 | 5 | 4 | 6 | 2 | 1 | 3 | 4 | 9 | 3 | 5 | 1 | 0 | 1 | 2 | 7 | 3 | 1 | 2 | 3 | 3 | 1 | 3 | 2 | 3 | 6 | 2 | 2 | 4 | 5 | 1 | 4 | 4 | 5 | 2 | 2 | 3 | 1 | 4 | 8 |
Readme
- Source
- raw.githubusercontent.com
Prettierd Format
Sublime Text plugin to format files faster using prettierd.
Installation
- Install prettierd globally with npm/yarn/pnpm:
npm i -g @fsouza/prettierd
- Install this plugin with Package Control:
Package Control: Install Package → Prettierd Format
- Restart Sublime Text
Usage
By default it formats on save any file supported by Prettier out-of-the-box.
Commands
To format a file:
Prettierd: Format
To save a file without formatting:
Prettierd: Save without formatting
Options
Enable/disable format on save:
"format_on_save": true
Add additional extensions (enabled via prettier plugins) to be formatted either on save or commands:
"additional_extensions": ["php"]
Exclude extensions from being formatted on save:
"disabled_extensions_on_save": ["md"]
Exclude directories from being formatted on save:
"disabled_directories_on_save": ["*/node_modules/*"]
Optional, path to prettierd executable. If not specified, it will be searched for in the system:
"prettierd_path": null
All these options can be configured globally in your user settings, or per project under the "PrettierdFormat" setting:
{
"settings":
{
"PrettierdFormat":
{
"format_on_save": true
}
}
}
Notes
This plugin does nothing else than piping the input to prettierd and replacing the view contents with the output.
It is basically just like executing cat file.js | prettierd file.js with the command line.
For this reason, any issue with prettier plugins or configuration should be investigated on the prettierd repo as it is the underlying tool actually interacting with Prettier.
Astro / Svelte
As of September 2023, there are some upstream issues with Astro and Svelte files.
You can format them with the command LSP: format after installing their LSPs and enabling format on save for each language in the LSP settings.
Using the above command not only respects the .prettierrc configuration but is also very fast.
License
0BSD