Prettierd Format
Sublime Text plugin to format files faster using prettierd
Details
Installs
- Total 11K
- Win 6K
- Mac 3K
- Linux 2K
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 | Feb 1 | Jan 31 | Jan 30 | Jan 29 | Jan 28 | Jan 27 | Jan 26 | Jan 25 | Jan 24 | Jan 23 | Jan 22 | Jan 21 | Jan 20 | Jan 19 | Jan 18 | Jan 17 | Jan 16 | Jan 15 | Jan 14 | Jan 13 | Jan 12 | Jan 11 | Jan 10 | Jan 9 | Jan 8 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 8 | 13 | 12 | 16 | 15 | 13 | 6 | 8 | 21 | 16 | 12 | 11 | 19 | 8 | 8 | 19 | 19 | 17 | 10 | 10 | 13 | 8 | 10 | 11 | 8 | 21 | 12 | 6 | 11 | 19 | 12 | 14 | 15 | 17 | 9 | 8 | 13 | 9 | 19 | 12 | 7 | 8 | 7 | 15 | 9 | 10 |
Mac | 7 | 2 | 13 | 11 | 5 | 8 | 5 | 10 | 7 | 8 | 7 | 7 | 8 | 5 | 1 | 7 | 12 | 11 | 12 | 10 | 2 | 3 | 6 | 9 | 9 | 4 | 11 | 4 | 3 | 11 | 4 | 6 | 7 | 6 | 3 | 9 | 5 | 13 | 11 | 11 | 9 | 7 | 4 | 5 | 7 | 5 |
Linux | 3 | 5 | 3 | 5 | 5 | 4 | 4 | 1 | 1 | 0 | 5 | 5 | 9 | 4 | 1 | 8 | 5 | 4 | 4 | 6 | 1 | 4 | 3 | 5 | 8 | 4 | 2 | 3 | 5 | 6 | 4 | 4 | 8 | 9 | 2 | 4 | 2 | 8 | 1 | 5 | 3 | 2 | 3 | 5 | 4 | 2 |
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
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