Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apheleia-mode-alist: Add new tree-sitter based major modes #145

Merged
merged 3 commits into from
Nov 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ The format is based on [Keep a Changelog].
[#134] and [#138].
* `apheleia-mode` lighter is now customizable ([#143]).

### Enhancements
* Emacs 29's tree-sitter-based major modes have been added to
`apheleia-mode-alist` ([#145]).

### Bugs fixed
* If a formatter exited with a zero exit code when being killed by a
signal (even though that is really weird behavior and arguably a bug
Expand All @@ -31,6 +35,7 @@ The format is based on [Keep a Changelog].
[#137]: https://github.com/radian-software/apheleia/pull/137
[#138]: https://github.com/radian-software/apheleia/pull/138
[#143]: https://github.com/radian-software/apheleia/pull/143
[#145]: https://github.com/radian-software/apheleia/pull/145

## 3.1 (released 2022-11-11)
### Enhancements
Expand Down
9 changes: 9 additions & 0 deletions apheleia.el
Original file line number Diff line number Diff line change
Expand Up @@ -1122,15 +1122,20 @@ function: %s" command)))
(php-mode . phpcs)
;; json-mode has to come before javascript-mode (aka js-mode)
(json-mode . prettier-json)
(json-ts-mode . prettier-json)
;; rest are alphabetical
(bash-ts-mode . shfmt)
(beancount-mode . bean-format)
(c++-ts-mode . clang-format)
(cc-mode . clang-format)
(c-mode . clang-format)
(c-ts-mode . clang-format)
(c++-mode . clang-format)
(caml-mode . ocamlformat)
(common-lisp-mode . lisp-indent)
(crystal-mode . crystal-tool-format)
(css-mode . prettier-css)
(css-ts-mode . prettier-css)
(dart-mode . dart-format)
(elixir-mode . mix-format)
(elm-mode . elm-format)
Expand All @@ -1140,15 +1145,18 @@ function: %s" command)))
(haskell-mode . brittany)
(html-mode . prettier-html)
(java-mode . google-java-format)
(java-ts-mode . google-java-format)
(js3-mode . prettier-javascript)
(js-mode . prettier-javascript)
(js-ts-mode . prettier-javascript)
(kotlin-mode . ktlint)
(latex-mode . latexindent)
(LaTeX-mode . latexindent)
(lua-mode . stylua)
(lisp-mode . lisp-indent)
(nix-mode . nixfmt)
(python-mode . black)
(python-ts-mode . black)
(ruby-mode . prettier-ruby)
(rustic-mode . rustfmt)
(rust-mode . rustfmt)
Expand All @@ -1159,6 +1167,7 @@ function: %s" command)))
(TeX-mode . latexindent)
(tuareg-mode . ocamlformat)
(typescript-mode . prettier-typescript)
(typescript-ts-mode . prettier-typescript)
(web-mode . prettier)
(yaml-mode . prettier-yaml))
"Alist mapping major mode names to formatters to use in those modes.
Expand Down