Skip to content

Apheleia 4.0

Compare
Choose a tag to compare
@raxod502 raxod502 released this 23 Nov 22:12
· 48 commits to main since this release

Breaking changes

  • The order of entries in apheleia-mode-alist is no longer as important. Specifically, if two different mode entries in apheleia-mode-alist match the current buffer, then the more specific one is used, even if it comes later. This is generally speaking what you would expect to happen. For other cases, such as ordering of regex entries, or modes versus regexes, order is respected as before ([#206]).
  • Disable formatting of go module files with gofmt. This was never supported (#214).
  • Remove support for Emacs 26 (#215).
  • Emacs will infer indentation configuration from your major mode and, by default, supply this configuration to formatters, to ensure consistency between how you have Emacs configured and how your formatter is configured. You can disable this by setting apheleia-formatters-respect-indent-level to nil (#167, #208).

Enhancements

  • Use the prettier-json formatter for js-json-mode (#209).
  • Prettier is now enabled in svelte-mode.
  • More tree-sitter based major modes have been added to apheleia-mode-alist ([#191]).
  • All marks (the current (mark), and the mark-ring) are now adjusted, alongside (point) (#197).
  • Built-in formatters now use a new "apheleia-npx" built-in script instead of the legacy npx keyword. The effect of the new script is the same, except that it also works with Yarn PNP projects as well as node_modules style projects ([#200]).
  • Autoload the apheleia-goto-error command (#215).
  • Use lisp-indent as default formatter for emacs-lisp-mode (#223)
  • Use hclfmt for formatting hashicorp HCL files (#231)
  • The mix format formatter will respect .formatter.exs files even if they are present in a parent directory rather than the same directory as the file being formatted (#232).

Internal Changes

  • Refactored the organisation of the apheleia package for ease of understanding and usability (#215).
  • The new scripts/pnp-bin.js script is standalone minified nodejs built from the pnp-bin repo, extracted from apheleia PR [#200].
  • Test environment bumped from Ubuntu 20.04 to 22.04 (#242).
  • The function apheleia--format-after-save was renamed to apheleia-format-after-save. This is only called out explicitly because it was added to after-save-hook so customization that assumed this behavior might break.

Bugs fixed

  • ktlint would emit log messages into its stdout when formatting, and these would get spliced into the source file. This has been fixed by suppressing all logs from ktlint.
  • Disable colorized output with the jq formatter (#213).
  • Fixed apheleia skipped running a formatter on a remote when it isn't installed locally (#215).
  • Fixed clang-format formatter did not respect remote file-name component for the assumed file-name (#215).
  • Always supply --stdin-filepath to Prettier to allow it to pick up the correct settings from project-level config files (#253).

Formatters