mirror of
https://github.com/vale981/apheleia
synced 2025-03-04 09:01:42 -05:00
Add perltidy
indent level and line length support (#261)
This commit is contained in:
parent
c8d9ad43ba
commit
fe27888c6b
3 changed files with 10 additions and 1 deletions
|
@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog].
|
||||
|
||||
## Unreleased
|
||||
### Enhancements
|
||||
* The `perltidy` formatter now supports Emacs indentation and line length
|
||||
settings ([#261]).
|
||||
|
||||
### Formatters
|
||||
* [`js-beautify`](https://github.com/beautify-web/js-beautify) for
|
||||
[JavaScript](https://www.javascript.com/),
|
||||
|
@ -17,6 +21,7 @@ The format is based on [Keep a Changelog].
|
|||
js, jsx, ts, tsx, json, jsonc, md files. ([#264])
|
||||
|
||||
[#229]: https://github.com/radian-software/apheleia/pull/229
|
||||
[#261]: https://github.com/radian-software/apheleia/pull/261
|
||||
[#263]: https://github.com/radian-software/apheleia/pull/263
|
||||
[#264]: https://github.com/radian-software/apheleia/pull/264
|
||||
|
||||
|
|
|
@ -91,7 +91,9 @@
|
|||
(ocamlformat . ("ocamlformat" "-" "--name" filepath
|
||||
"--enable-outside-detected-project"))
|
||||
(ormolu . ("ormolu"))
|
||||
(perltidy . ("perltidy" "--quiet" "--standard-error-output"))
|
||||
(perltidy . ("perltidy" "--quiet" "--standard-error-output"
|
||||
(apheleia-formatters-indent "-t" "-i")
|
||||
(apheleia-formatters-fill-column "-l")))
|
||||
(pgformatter . ("pg_format"
|
||||
(apheleia-formatters-indent "--tabs" "--spaces" 'tab-width)
|
||||
(apheleia-formatters-fill-column "--wrap-limit")))
|
||||
|
|
|
@ -35,6 +35,7 @@ always returns nil to defer to the formatter."
|
|||
(unless indent-var
|
||||
(setq indent-var
|
||||
(cl-case major-mode
|
||||
(cperl-mode 'cperl-indent-level)
|
||||
(css-mode 'css-indent-offset)
|
||||
(css-ts-mode 'css-indent-offset)
|
||||
(js-jsx-mode 'js-indent-level)
|
||||
|
@ -47,6 +48,7 @@ always returns nil to defer to the formatter."
|
|||
(json-ts-mode 'json-ts-mode-indent-offset)
|
||||
(nxml-mode 'nxml-child-indent)
|
||||
(robot-mode 'robot-mode-basic-offset)
|
||||
(perl-mode 'perl-indent-level)
|
||||
(scss-mode 'css-indent-offset)
|
||||
(web-mode 'web-mode-indent-style)
|
||||
(tsx-ts-mode 'typescript-ts-mode-indent-offset)
|
||||
|
|
Loading…
Add table
Reference in a new issue