Skip to content

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, Go templates, Hugo, Nunjucks, Java, Laravel Blade, Liquid, PHP, Shell, Smarty, SQL, Tailwind CSS, TOML, Twig, and XML — no extra setup required.

GitHub Release Install in Nova 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).

  • Project Settings Inheritance: Workspace settings default to "Global Setting", and pop-up menus name the value they inherit — "Global Setting (Enabled)" — so the effective configuration is always visible without leaving Project Settings.

  • 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, Go Templates, Hugo, Java, Laravel Blade, Liquid, Nunjucks, PHP, Shell, Smarty, 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. Plugins declared in your project’s Prettier config are loaded from your project’s node_modules when they aren’t bundled with the extension.

  • Nova-Managed Node.js: If Node.js isn’t on your PATH, Prettier⁺ falls back to the copy of Node.js that Nova installs and manages for its language servers (for example when you install the TypeScript language server under Settings → Languages). No separate Node.js installation is required.

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-go-template ✅ Enabled Bare .tpl files format as Smarty.
prettier-plugin-hugo-post ➕ Optional Markdown files route through Hugo when enabled.
prettier-plugin-java ✅ Enabled ⚠️ Recommended: Java Language Definition
prettier-plugin-liquid ✅ Enabled ⚠️ Recommended: Liquid
prettier-plugin-nginx ✅ Enabled ⚠️ Recommended: NGINX for Nova
prettier-plugin-nunjucks ✅ Enabled ⚠️ Recommended: Nunjucks
prettier-plugin-properties ✅ Enabled ⚠️ Recommended: Java Language Definition
prettier-plugin-sh ✅ Enabled –
prettier-plugin-smarty ✅ Enabled ⚠️ Recommended: Smarty Templates
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.

  • ➕ Optional — Tailwind CSS and Hugo support are included but disabled by default. Enable them 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

Development setup, the test suite, and the manual formatting samples are documented in CONTRIBUTING.md.

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.

Releases

Sponsor this project

Used by

Contributors

Languages