- Format perl files with perltidy
- 2 Installs
This extension is allowed to:
- Launch Subprocesses
Perltidy for Nova
This extension provides integration with the Perltidy formatter for the Nova text editor.
The only requirement is Perltidy itself, which can be installed from the official website, CPAN, or Homebrew:
$ brew install perltidy
To configure global preferences, open Extensions → Extension Library... then select perltidy's Preferences tab. Note that this extension relies on parsing
STDERR from Perltidy. If you include options to suppress those it will not work as expected.
To run Perltidy:
- Open the command palette and type
perltidyfrom 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.
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.
Copyright (c) 2023 isla w
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.