ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Prettierd Format

Sublime Text plugin to format files faster using prettierd

Details

Installs

  • Total 10K
  • Win 5K
  • Mac 3K
  • Linux 2K
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 Jan 7 Jan 6 Jan 5 Jan 4 Jan 3 Jan 2 Jan 1 Dec 31 Dec 30 Dec 29 Dec 28 Dec 27 Dec 26 Dec 25 Dec 24 Dec 23 Dec 22 Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7
Windows 4 17 9 8 13 9 19 12 7 8 7 15 9 10 9 9 12 5 9 17 5 14 13 11 7 14 20 12 12 12 5 10 12 9 16 7 13 7 13 15 22 11 9 11 11 11
Mac 0 6 3 9 5 13 11 11 9 7 4 5 7 5 4 7 0 3 4 4 0 15 4 2 4 3 10 4 12 2 10 8 5 8 12 12 4 3 4 3 5 4 5 12 7 4
Linux 2 9 2 4 2 8 1 5 3 2 3 5 4 2 2 4 3 3 3 4 8 3 6 2 3 7 3 3 3 3 4 3 1 1 4 2 5 2 5 3 7 3 6 3 7 3

Readme

Source
raw.​githubusercontent.​com

Prettierd Format

Sublime Text plugin to format files faster using prettierd.


Installation

  1. Install prettierd globally with npm/yarn/pnpm:
npm i -g @fsouza/prettierd
  1. Install this plugin with Package Control:

Package Control: Install PackagePrettierd Format

  1. 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