Nova

Extensions


Readme

Beautify for Nova

Beautify integrates JS-Beautify into Nova for formatting Javascript, JSON, CSS, SCSS, LESS, HTML and XML.

Configuration

  • Formatting is based on the syntax mode of the editor
  • Indentation settings are inherited from the editor
  • Line endings are inherited from the open document
  • Other configuration options can be set as global preferences
  • Option to format selection or document as specific syntax

Invoking

  • Via shortcut ⌥⇧F
  • Via menu Editor > Beautify > Format
  • Via command palette ⌘⇧P and then type Format
  • Via command palette ⌘⇧P and then type Format as JSON, Format as CSS, Format as ...
  • Automatically formats any selected text or the whole document if there was no selection

Known issues

  • If some configuration options do not have an effect, try disabling the preserve existing line-breaks and check other preserve options.
  • If some configuration options entered into text fields are not directly used, then this is due to a bug in Nova. You have to switch to another activated extension in the extension library (i.e. loose focus on the Beautify extension) before the values get updated. You can check which configuration options are being used by checking the extension console after formatting.

Screenshots


Changelog

Version 1.4.1

  • Automatic lowercasing of configuration option values (as expected by JS-Beautify)
  • Extension console logs configuration options used for formatting

Version 1.4

  • Added commands to format as specific syntax
  • Removed Format selection
  • Automatically formats any selected text or the whole document if there was no selection

Version 1.3

  • Added config options for add spaces around combinators (CSS, SCSS & LESS)

Version 1.2

  • Added config options for unformatted tags, unformatted content and extra lines before (HTML & XML)

Version 1.1

  • Line ending setting is inherited from the open document
  • Main configuration options of JS-Beautify can be set globally

Version 1.0

  • Initial release