mirror of
https://github.com/vale981/apheleia
synced 2025-03-05 09:31:40 -05:00
6.8 KiB
6.8 KiB
Changelog
All notable changes to this project will be documented in this file. The format is based on Keep a Changelog.
Unreleased
Features
- Allow apheleia to format buffers without an underlying file (#52).
- Support functional formatters (#62). You can now use a lisp function as a formatter allowing you to plug more powerful formatters into apheleia such as language servers.
Changes
- Stdout and stderr buffers are no longer retained after running a
formatter. Instead, the stderr is appended into an
*apheleia-whatever-log*
buffer if it fails, or unconditionally if the new user optionapheleia-verbose
is set to non-nil. See #64, #65. The log buffer is not hidden by default, and this can be changed via the new user optionapheleia-hide-log-buffer
(#69).
Formatters
- fish_indent for Fish (#68).
Bugs fixed
- Allow running the same formatter in multiple buffers in parallel (#64, #65). Previously, when saving a number of files at the same time, the contents of those buffers could be corrupted by a race condition.
- In some circumstances the error
wrong-type-argument bufferp nil
could be reported when running certain formatters under Apheleia. This has been fixed. - Rustfmt is no longer passed the
--unstable-features
and--skip-children
flags, since they are not available on all versions of Rustfmt (#69).
1.2 (released 2021-12-27)
Enhancements
- Support multiple formatters (#31). You can now configure a list of
formatters for a major-mode in
apheleia-mode-alist
and they will be run in sequence. - Support evaluating items in
apheleia-formatters
to make formatter commands more dynamic (#50, #55). - Allow apheleia to format buffers without an underlying file (#52).
Formatters
- ClangFormat for C/C++
google-java-format
for Java- isort for Python (#51)
- latexindent for LaTeX
- rustfmt for Rust (#24)
mix format
for Elixir (#48)@prettier/plugin-ruby
for Ruby (#49)
Bugs fixed
- Fix spelling error in generated process names (#32).
- Apheleia no longer conflicts with undo-fu (#39).
- Apheleia no longer triggers
after-set-visited-file-name-hook
, which reduces conflicts with various modes. For example,lsp-mode
will no longer trigger a reconnect every time you save. - Fix inconsistent
:type
spec preventing use ofcustomize-variable
onapheleia-formatters
. - Fix mixed style line ending generated by
diff
(#54) by adding--strip-trailing-cr
todiff
's argument list.
1.1.2 (released 2021-02-26)
Enhancements
- Prettier is now enabled in
json-mode
.
Bugs fixed
- Prettier now respects
.prettierignore
(#21). - Apheleia's global mode should no longer trigger warnings about a locally
let-bound
after-save-hook
(#27).
1.1.1 (released 2020-07-16)
Formatters
- New: OCamlFormat for Ocaml (#19).
Bugs fixed
- Previously, there were some race conditions related to switching the current buffer. In particular, if you switched the current buffer right after saving, or save two buffers in quick succession, then it was possible for one buffer to be overwritten or to not be formatted. These problems have been fixed (#8).
- Previously, enabling
undo-tree-auto-save-history
caused Apheleia to mark the buffer as modified after formatting. This has been fixed (#10). - Apheleia now tries harder to accidentally enter an infinite formatting loop (#12).
1.1 (released 2020-04-02)
Enhancements
- There is now a maximum length for the dynamic programming algorithm,
controlled by
apheleia-max-alignment-size
. This prevents Emacs from hanging due to Apheleia. under any circumstances (#4).
Formatters
Bugs fixed
- Previously, weirdness could happen if manually running Prettier via
M-x apheleia-format-buffer
on a buffer which was modified from what was written to disk. Now we simply abort running a command that uses thefile
keyword if the buffer is modified, since it will not produce correct results. This should not affect normal usage of Apheleia. - Previously, the buffer could be erased when running Apheleia from a buffer that had no backing file. This has been fixed, and Apheleia can run correctly on buffers both with and without backing files (#9).
1.0 (released 2019-09-20)
Added
- Package
apheleia
- Command
apheleia-format-buffer
- User options:
apheleia-formatters
, with supported formatters:black
prettier
gofmt
terraform
apheleia-mode-alist
apheleia-post-format-hook
- Variable
apheleia-formatter
- Minor mode
apheleia-mode
(andapheleia-global-mode
)