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

Prettierd Format

Sublime Text plugin to format files faster using prettierd

Details

Installs

  • Total 8K
  • Win 4K
  • Mac 2K
  • Linux 2K
Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9
Windows 8 12 8 12 8 13 12 16 11 9 10 2 14 15 16 10 14 16 7 11 11 9 10 10 12 9 4 9 13 13 13 12 10 4 14 11 10 12 11 7 13 16 7 8 15 9
Mac 4 6 6 5 3 3 5 8 12 4 5 1 4 4 7 10 10 8 6 5 8 3 4 9 4 14 3 8 9 12 6 3 5 0 8 8 6 11 6 3 5 8 9 19 7 4
Linux 4 4 10 4 2 3 6 10 1 8 4 5 5 4 7 5 1 5 8 4 3 11 4 4 2 3 2 4 3 6 7 9 5 2 4 8 7 5 4 3 2 9 6 3 4 4

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