Skip to content

Commit

Permalink
Add support for remaining treesit modes built into Emacs29 (radian-so…
Browse files Browse the repository at this point in the history
…ftware#151)

* Add support for rust-ts-mode

* Add new builtin go-, ruby- and yaml- treesit-modes

Modes taken from NEWS.29 emacs29 release notes

* Add new PR number to changelog entry for ts-modes
  • Loading branch information
meliache authored Jan 27, 2023
1 parent 93d2b30 commit 2520f14
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The format is based on [Keep a Changelog].

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

### Bugs fixed
* If a formatter exited with a zero exit code when being killed by a
Expand Down
7 changes: 6 additions & 1 deletion apheleia.el
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,8 @@ function: %s" command)))
(elm-mode . elm-format)
(fish-mode . fish-indent)
(go-mode . gofmt)
(go-mod-ts-mode . gofmt)
(go-ts-mode . gofmt)
(graphql-mode . prettier-graphql)
(haskell-mode . brittany)
(html-mode . prettier-html)
Expand All @@ -1160,8 +1162,10 @@ function: %s" command)))
(python-mode . black)
(python-ts-mode . black)
(ruby-mode . prettier-ruby)
(ruby-ts-mode . prettier-ruby)
(rustic-mode . rustfmt)
(rust-mode . rustfmt)
(rust-ts-mode . rustfmt)
(scss-mode . prettier-scss)
(terraform-mode . terraform)
(TeX-latex-mode . latexindent)
Expand All @@ -1171,7 +1175,8 @@ function: %s" command)))
(typescript-mode . prettier-typescript)
(typescript-ts-mode . prettier-typescript)
(web-mode . prettier)
(yaml-mode . prettier-yaml))
(yaml-mode . prettier-yaml)
(yaml-ts-mode . prettier-yaml))
"Alist mapping major mode names to formatters to use in those modes.
This determines what formatter to use in buffers without a
setting for `apheleia-formatter'. The keys are major mode
Expand Down

0 comments on commit 2520f14

Please sign in to comment.