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

Prettierd Format

Sublime Text plugin to format files faster using prettierd

Details

Installs

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

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