Skip to content

stonerl/nova-prettier-extension

Repository files navigation

Prettier⁺ for Nova

The Swiss Army knife for code formatting — seamlessly format JavaScript, TypeScript, JSON, CSS, HTML, Markdown, and more in Nova, with built-in support for Astro, EJS, Java, Laravel Blade, Liquid, PHP, SQL, Tailwind CSS, TOML, Twig, and XML — no extra setup required.

⚠️ Prettier⁺ is a drop-in replacement for the original Prettier Extension. To avoid conflicts, make sure to disable the original before installing or activating Prettier⁺.

GitHub Release Install in Nova Join us on Gitter Translate on Weblate

Features

  • 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).

  • Format Document (Forced): Ignores .prettierignore and Ignored Syntaxes, formatting anyway via Editor > Prettier⁺ > Format Document (Forced).

  • Format Selection: Precisely formats only the highlighted portion of your code (currently supports JavaScript, TypeScript, GraphQL, and Handlebars).

  • Advanced Syntax Detection: Reliably detects the correct syntax based on file extension — even when Nova misidentifies it. Blade, Java, SQL, and more are correctly handled out of the box.

  • Language Support: Supports all Prettier-supported languages, including Angular, CSS, Flow, GraphQL, HTML, JavaScript, JSON, JSX, Less, Markdown, SCSS, TypeScript, Vue, and YAML — plus additional ones via bundled plugins, such as Astro, EJS, Java, Laravel Blade, Liquid, PHP, SQL, Tailwind CSS, TOML, Twig, and XML.

  • 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 bundled Prettier and plugins if none are installed.

Bundled Plugins

Plugin Status Notes
@prettier/plugin-php ✅ Enabled
@prettier/plugin-xml ✅ Enabled
prettier-plugin-astro ✅ Enabled ⚠️ Recommended: Astro
prettier-plugin-blade ✅ Enabled ⚠️ Recommended: Laravel Suite
prettier-plugin-ejs ✅ Enabled
prettier-plugin-ejs-tailwindcss ✅ Enabled ⚠️ Requires: prettier-plugin-tailwindcss
prettier-plugin-java ✅ Enabled ⚠️ Recommended: Java Language Definition
prettier-plugin-liquid ✅ Enabled ⚠️ Recommended: Liquid
prettier-plugin-nginx ✅ Enabled ⚠️ Recommended: NGINX for Nova
prettier-plugin-properties ✅ Enabled ⚠️ Recommended: Java Language Definition
prettier-plugin-sql ✅ Enabled ⚠️ Recommended: SQL
prettier-plugin-tailwindcss ➕ Optional ⚠️ Recommended: Tailwind CSS
prettier-plugin-toml ✅ Enabled ⚠️ Recommended: TOML
prettier-plugin-twig ✅ Enabled ⚠️ Recommended: Twig

Plugin Legend

  • Enabled by Default — All plugins are active out of the box.

  • Tailwind (Optional) — Tailwind CSS support is included but disabled by default. Enable it via the extension or project settings.

  • ⚠️ Extension Recommended — These plugins work best when the corresponding Nova syntax extension is installed.

If you want to see other plugins being integrated, head over to the Discussions.

Permissions

Launch Subprocesses

  • To install the bundled Prettier and its plugins.
  • To launch the Prettier Service for code formatting.

Read Files

  • To read Prettier configuration files, such as .prettierrc and .prettierignore.

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.