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

Prettierd Format

Sublime Text plugin to format files faster using prettierd

Details

Installs

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

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/*"]


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