• Sign In



  • Categories

    Extension Details



    Readme

    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, Shell, 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,
      Shell,
      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-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-sh ✅ Enabled
    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.

    Release Notes

    3.9.2 - 2026-09-21

    Added

    • Dockerfile and shell script formatting
    • prettier-plugin-sh (0.19.0) is now bundled and enabled by default,
      adding format support for Dockerfile/Containerfile and shell scripts
      (sh, bash, zsh, ksh, csh, bats), plus rc files, gradlew,
      .nvmrc, PKGBUILD, and dotenv-style files.
    • New plugin options: variant, indent, binaryNextLine,
      switchCaseIndent, spaceRedirects, keepComments, minify,
      singleLine, functionNextLine.

    Fixed

    • Duplicate "Resolving Prettier installation…" output at startup
    • An observer wrapper had inverted semantics, so the module-path
      observer's initial notification triggered a second, debounced service
      resolution on every activation.
    • Nova froze when activating Prettier⁺ alongside other extensions
    • Concurrent config writes from two extensions during activation could
      deadlock Nova's config store. Prettier⁺ now defers all config writes
      until after activation and only writes when a value actually changes.

    Development

    • Patched prettier-plugin-sh upstream: formatWithCursor crashed on
      undefined AST nodes, and async Dockerfile printing broke cursor handling.
    • Unmappable cursor offsets (-1) are now treated as "keep position".

    3.9.1 - 2026-09-21

    Fixed

    • Force Format vs .prettierignore
    • Format Document (Forced) now reliably ignores .prettierignore for
      the current file. Previously this only worked if the file had not been
      formatted normally since the Prettier service started: a cached
      ignored: true result was served to the forced call because the cache
      was keyed without the ignore path.

    Performance

    • File info lookups now pass the known parser to Prettier, skipping its
      expensive parser inference for uncached calls.

    3.9.0 - 2026-09-21

    Added

    • Config-declared plugins are now surfaced
    • If the project's Prettier config declares plugins, a notification
      explains that Prettier⁺ formats with its own bundled plugins instead of
      failing silently - but only for plugins not already covered by the
      bundled set.
    • New option: astroCompressHTML
    • jsx (default) / html / none - mirror the compressHTML setting
      of the Astro project.
    • SQL: ClickHouse dialect added to the sql-formatter language dropdown.
    • PHP: 8.5 support added to the phpVersion dropdown.
    • .editorconfig changes now restart the Prettier service, so new
      settings are picked up without a manual restart.

    Changed

    • Updated prettier to version 3.9.8.
    • Updated @shopify/prettier-plugin-liquid to version 1.11.0.
    • Updated prettier-plugin-java to version 2.10.4.
    • Updated @shufo/prettier-plugin-blade to version 1.16.2.
    • Updated prettier-plugin-astro to version 1.0.1.
    • Updated prettier-plugin-tailwindcss to version 0.8.1.
    • Updated prettier-plugin-sql to version 0.20.0.
    • Updated @prettier/plugin-php to version 0.25.0.
    • Updated @zackad/prettier-plugin-twig to version 0.17.0.
    • Updated prettier-plugin-nginx to version 2.0.0.
    • Updated prettier-plugin-properties to version 0.3.1.
    • ⚠️ prettier-plugin-astro 1.0 is a full rewrite on the new Rust
      compiler: formatting output may change, and .astro files now require
      Node.js 22.12+.

    Fixed

    • HTML / HTML (EJS) formatting on Prettier 3.9
    • The bundled prettier-plugin-ejs-tailwindcss crashed on Prettier 3.9.
      It is replaced by composing the bundled prettier-plugin-ejs with
      prettier-plugin-tailwindcss - class sorting and EJS tag support are
      identical.
    • Prettier service lifecycle hardening
    • Hung service starts are torn down after a 10 second timeout instead of
      reporting success while the service was dead.
    • Late events from a superseded service process can no longer corrupt
      the current startup.
    • Stability
    • Multi-range selections are preserved when formatting applies.
    • Formatting issues now report numeric line/column values.
    • File handles are no longer leaked when config or package.json reads fail.
    • IPC robustness
    • JSON-RPC frame writes are serialized.
    • The 32 MiB payload limit is now enforced in bytes, not characters.
    • Fail fast when the configured Prettier module path is missing.
    • .inc files are no longer treated as SQL.

    Removed

    • prettier-plugin-ejs-tailwindcss - see the fix above. The
      prettier-plugin-ejs-tailwindcss.enabled setting no longer has any
      effect and can be removed from saved settings.

    Performance

    • Skipped serializing options for debug logging when debug logging is off.

    Development

    • Upgraded the build toolchain (rollup 4.63, ESLint 10, Babel 8,
      terser plugin 1.0) - minified output is byte-identical.

    3.6.4 - 2026-09-21

    • Fix startup crash

    3.6.2 - 2025-07-12

    • Updated prettier-plugin-sql to version 0.19.2
    • Updated prettier-plugin-tailwindcss to version 0.6.14
    • Updated prettier-plugin-toml to version 2.0.6
    • Updated @prettier/plugin-xmlto version 3.4.2
    • Updated @shufo/prettier-plugin-blade to version 1.15.4

    3.6.1 - 2025-07-01

    • Updated prettier to version 3.6.2.
    • Updated prettier-plugin-java to version 2.7.1.

    3.6.0 - 2025-06-24

    Changed

    • Updated prettier to version 3.6.0.
    • Updated translations.

    Added

    • Added new checkIgnorePragma option.

    Security

    • Updated brace-expansion to fix security vulnerabilities.

    3.5.49 - 2025-06-21

    • Updated prettier-plugin-tailwindcss to version 0.6.13.

    3.5.48 - 2025-06-06

    • Updated prettier-plugin-java to version 2.6.8.

    3.5.47 - 2025-06-01

    Changed

    • Updated prettier-plugin-tailwindcss to version 0.6.12.

    3.5.46 - 2025-05-29

    Changed

    • Clarified permission usage in README.md by detailing the Launch Subprocesses
      and Read Files requirements.

    3.5.45 - 2025-05-24

    Changed

    • Print Width toggle limits
    • Enforced a minimum value of 60 and a maximum value of 140
      when using the Print Width toggle in the UI.
    • Higher or lower values can still be entered manually in the settings.

    3.5.44 - 2025-05-24

    Changed

    • SQL & TOML cursor tracking
    • Replaced dummy locStart: () => -1 / locEnd: () => -1 with
      locStart: () => 0 and locEnd: () => MAX_*_FILE_SIZE in both
      prettier-plugin-sql and prettier-plugin-toml.
    • Ensures Prettier’s cursor logic always returns a defined (non-undefined) position.

    Added

    • Cursor fallback
    • In the editor integration, if Prettier fails to compute a position (null/undefined),
      fall back to editor.selectedRange.start.

    3.5.43 - 2025-05-20

    Changed

    • Updated prettier-plugin-sql to version 0.19.1
    • Updated prettier-plugin-toml to version 2.0.5
    • Switched from .cjs to .js modules for compatibility with ES modules for both plugins

    3.5.42 - 2025-05-20

    Hotfix

    • Downgrade prettier-plugin-sql to version 0.19.0.
    • Downgrade prettier-plugin-toml to version 2.0.4.

    The latest plugin releases resulted in a "No parser for …" error.

    3.5.41 - 2025-05-18

    Changed

    • Updatedprettier-plugin-sql to version 0.19.1.
    • Updatedprettier-plugin-toml to version 2.0.5.
    • Missing parser and ignored syntax logs appear as info now, w/o the need to
      enable debug logging

    3.5.40 – 2025-05-07

    Added

    • Centralized Notification Handling
    • Introduced notifications.js to encapsulate all Nova NotificationRequest logic.
    • Provides showNotification() for posting UI notifications with optional actions and callbacks.
    • Provides cancelNotification() to dismiss notifications by ID.

    Refactored

    • Notification API
    • Notification fields like type, placeholder, and inputValue are now only set when explicitly defined.
    • Results in cleaner, more predictable UI behavior.
    • Simplified notification calls throughout the codebase for improved maintainability and testability.

    3.5.39 – 2025-05-06

    Development

    • Added ESLint as a dev dependency and linted the entire codebase.
    • Applied ESLint auto-fixes and suppressed false-positive warnings (e.g., unused variables).
    • Added eslint-config-prettier and aligned ESLint rules with Prettier’s formatting.

    Refactored

    • Consolidated plugin-loading logic into a lookup map for clearer, DRY syntax-to-plugin resolution.

    3.5.38 – 2025-05-05

    Added

    • Stale-response cancellation for Prettier: track in-flight requests per file
      URI and ignore outdated replies
    • JSON-RPC handler unsubscription API and automatic unpipe/destroy on fatal parser errors

    Changed

    • JSON-RPC parser: revamped to a buffer-of-buffers strategy, dynamic
      \r?\n\r?\n header detection, stale-byte pruning, proper callback error
      signaling, optional logger injection and full JSDoc typings
    • Formatter: centralized all flags and readiness checks in private
      _formatEditor, enforced mutual-exclusivity of forced, isSaving and
      selectionOnly, and simplified command handlers to one-liners
    • Bootstrap: dropped all prettier-eslint support/detection and streamlined
      startup to only require PrettierService

    Performance

    • JSON-RPC header parsing now uses Buffer.indexOf
      (no intermediate ASCII strings or regex), cutting allocations and GC pressure

    Documentation

    • Added comprehensive JSDoc for JSON-RPC constants/methods, PrettierService’s
      public API (format, hasConfig, getConfig) and private helpers
    • Updated Help section to clarify that prettier-eslint is unsupported and
      direct ESLint should be used

    3.5.37 – 2025‑05‑02

    Added

    • Plugin: prettier-plugin-toml
      Enables formatting support for .toml files.

    • Help Section
      A dedicated Help Section has been added, accessible via
      Extensions → Prettier⁺ → Prettier⁺ Help.

    3.5.36 – 2025‑05‑01

    Fixed

    • SQL Cursor Position
    • Resolved an issue where formatting SQL files would reset the cursor to the
      start of the document.
      The extension now preserves the editor's current cursor position since
      prettier-plugin-sql always returns 0 as the cursor offset.

    • Save Stall Prevention

    • Fixed a bug where Nova could hang on save if the Prettier service wasn’t ready.
      Formatting now waits for proper initialization before attaching to save events.

    Added

    • Missing Runtime Detection
    • A user-friendly error dialog now informs users if Node.js or npm is missing,
      with guidance on installing Node.js and updating the system PATH.

    Improved

    • Startup Resilience & Logging
    • Prevented a potential infinite loop on configuration changes during startup.
    • Logged both the extension and Nova versions at launch for easier debugging.
    • Detected and cached the system npm --version for improved diagnostics.
    • Renamed internal version helper for better clarity (isAtLeastminNovaVersion).

    3.5.35 - 2025-04-30

    Fixed

    • Lint Feedback: Fixed an issue where lint errors from Prettier were not
      forwarded to Nova’s issue panel. These are now correctly surfaced in-editor.

    3.5.34 – 2025‑04‑30

    Refactored

    • Prettier Service, JSON-RPC, and Formatter Resilience
    • Major internal rewrite of the JSON-RPC layer and service lifecycle
    • json-rpc.js
      • Rewritten as a Transform stream for proper stream piping
      • Header normalization, improved framing via Buffer.indexOf
      • Enforces JSON-RPC 2.0 spec (validates jsonrpc, id, method)
      • Supports batch requests and emits multiple messages per chunk
      • Handles parse errors gracefully (no more hard exits on invalid input)
      • Respects back-pressure on writes using 'drain' events
    • prettier-service.js
      • Service startup now awaits a handshake via notify('didStart')
      • Gracefully handles bootstrap errors via notify('startDidFail')
      • Centralized and simplified SIGTERM handler
    • formatter.js

      • Ensures isReady before each call to prevent premature RPC use
      • Catches all IPC errors in format() and hasConfig() to avoid crashes
    • Max Payload Size

    • Parser now enforces a 32 MiB limit on incoming JSON-RPC payloads

    • Lint Feedback

    • Lint errors from Prettier are now passed through to Nova’s issue providers
      for in-editor feedback

    Fixed

    • Formatter Safety Checks
    • Skips formatting if no syntaxKey could be determined
    • Prevents writing undefined or empty output to avoid file erasure

    3.5.33 – 2025‑04‑28

    Improved

    • Prettier service lifecycle and stability
    • Optimized startup, shutdown, and crash recovery behavior
    • Faster, more reliable restarts when configuration or project dependencies change
    • Reduced unnecessary restarts on clean exits

    • Debouncing and file watching

    • Smarter debouncing with separate timing for file and settings changes
    • Improved handling of external Prettier config files and custom config paths
    • All watchers and listeners are now properly cleaned up on extension shutdown

    • Logging

    • Added detailed logs for service startup, shutdown timing, and crash detection
    • Improved visibility into module loading failures

    3.5.32 - 2025-04-27

    Removed

    • Eliminated the now-redundant write entitlement,
      since migrations fully leverage Nova’s config APIs.

    3.5.31 - 2025-04-26

    Added

    • Added plugin: prettier-plugin-twig
      Enables formatting support for .twig files.

    3.5.30 - 2025-04-25

    Added

    • SQL Dialect Detection Based on File Extension
    • Maps known SQL-related extensions to supported sql-formatter dialects.
    • Prioritizes longest-match extension resolution for accuracy (e.g., .mariadb.sql over .sql).
    • Falls back to a generic 'sql' dialect when no match is found.
    • Extracted extractPath into shared helpers for reuse across modules.
    • Adds support for node-sql-parser dialect detection and compatibility.
    • Normalizes incompatible dialects (e.g., 'tsql' → 'transactsql') before parser invocation.
    • Falls back to 'sql' if the dialect is unsupported by node-sql-parser to ensure safe parsing.
    • Centralizes dialect validation and normalization logic in sql.js for a clean formatter integration.

    • Support for Nova's SQL Language Extension

    • When Nova's SQL Language extension is installed, the provided syntax is now used for dialect detection instead of resolving via the URI.

    3.5.29 – 2025‑04‑23

    Added

    • Added plugin: prettier-plugin-astro
      Enables formatting support for