Skip to content

weblate/nova-prettier-extension

 
 

Repository files navigation

Prettier+ for Nova

Experience seamless code formatting with Prettier directly in Nova.

  • Format on save: Automatically format your code on save (this setting can be customized per project), or manually format using Editor > Prettier > Format Document (⌥⇧F).
  • Language Support: Includes all languages supported by Prettier, such as Angular, CSS, Flow, GraphQL, HTML, Java, JavaScript, JSON, JSX, Less, Markdown, PHP, SCSS, SQL, TypeScript, Vue, XML, YAML, and additional plugins.
  • Configuration Support: Compatible with standard Prettier configuration, and .prettierignore files.
  • Plugin Usage: Utilizes Prettier and any plugins installed in your project, or defaults to the built-in Prettier and plugins if none are installed.

This extension can be used as a drop-in replacement for the original Prettier Extension. You can freely switch between both; just make sure that you only have one enabled at a time.

Bundled plugins

✅ Enabled by default

⚠️ Note: Before enabling any of the following plugins, make sure the corresponding Nova language extensions are installed:

Using external plugins in your project

To use external Prettier plugins, simply install them along with Prettier in your project.

Ignoring files

You can disable format on save for remote documents, documents without a Prettier configuration file, or specific syntaxes in the extension and project preferences. Additionally you can use Prettier's built-in exclusion feature by adding a .prettierignore file to the root of your project.

Note: adding it anywhere else won't work.

Using a different version of Prettier

Simply install the desired version of Prettier (1.15.0 or higher) in the root folder of your project. If you already have the project open in Nova, you'll need to reopen it after installing or updating Prettier for the extension to recognize and start using the new version.

You can also explicitly select an installation of Prettier (or prettier-eslint) by setting the Prettier module path in the extension or project settings.

Using Prettier forks or prettier-eslint

You should be able to use any fork of Prettier that utilizes the same API, as well as prettier-eslint, by explicitly setting the Prettier module path in the extension or project settings.

Working with remote files

Most features are supported for remote files; however, Prettier configuration and .prettierignore files are not. The default configuration set in the extension or project preferences will be used instead.

Versioning

Prettier+ for Nova follows Semantic Versioning, aligned with official Prettier releases. Versions are formatted as a.b.c, where:

  • a.b corresponds to the bundled Prettier version.
  • c is the extension’s specific build number (used for fixes or enhancements unrelated to the Prettier core).

For example, 3.5.4 uses Prettier v3.5.x and is the fourth extension build.

Contributing Translations

Languages Translation Status

Help translate Prettier+ for Nova and make it accessible to more developers in your language!

You can contribute translations directly via Weblate.

No coding experience required — just a GitHub or Weblate account and a few minutes of your time.

All contributions are greatly appreciated!

Acknowledgments

This extension builds upon the outstanding work of Alexander Weiss, who created the original Nova Prettier Extension. Without his efforts, this project would not have been possible.

Packages

No packages published

Languages

  • JavaScript 87.4%
  • Vue 2.6%
  • TypeScript 2.2%
  • PHP 1.8%
  • SCSS 1.6%
  • CSS 1.3%
  • Other 3.1%