Skip to content

Latest commit

 

History

History
36 lines (20 loc) · 1.79 KB

README.md

File metadata and controls

36 lines (20 loc) · 1.79 KB

Perltidy for Nova

This extension provides integration with the Perltidy formatter for the Nova text editor.

Requirements

The only requirement is Perltidy itself, which can be installed from the official website, CPAN, or Homebrew:

$ brew install perltidy

Configuration

To configure global preferences, open Extensions → Extension Library... then select perltidy's Preferences tab. Note that this extension relies on parsing STDOUT and STDERR from Perltidy. If you include options to suppress those it will not work as expected.

Usage

To run Perltidy:

  • Open the command palette and type perltidy
  • Select perltidy from the Editor menu

Perltidy will then format and replace the text in your current editor with a "tidy" version based on your configuration. If a block of text is selected, it will only format the selected text.

Errors

This extension will not apply any changes if Perltidy returns an error code. Perltidy does provide specific error output when code is not valid Perl, but it is not a linter. This extension attempts to capture and parse the Perltidy error output and convert it into issues within Nova:

This approach may yield mixed results; for example, a missing closing quote on line 30 might not manifest as a Perltidy error until the next quote appears on line 200. Depending on the problem, the errors may seem random and unrelated to the initial cause.

Camel icon created by Vector Stall - Flaticon