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