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