diff options
| -rw-r--r-- | CHANGELOG.md | 2 | ||||
| -rw-r--r-- | apheleia.el | 2 | ||||
| -rw-r--r-- | test/formatters/installers/elm-format.bash | 1 | ||||
| -rw-r--r-- | test/formatters/samplecode/elm-format/in.elm | 2 | ||||
| -rw-r--r-- | test/formatters/samplecode/elm-format/out.elm | 7 |
5 files changed, 14 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index bcf1458..90b9f49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,10 +17,12 @@ The format is based on [Keep a Changelog]. (e.g. scalafmt), do not erase the buffer ([#116]). ### Formatters +* [elm-format](https://github.com/avh4/elm-format) for Elm ([#100]). * [bean-format](https://github.com/beancount/beancount) for Beancount ([#101]). * [stylua](https://github.com/JohnnyMorganz/StyLua) for Lua ([#105]). +[#100]: https://github.com/radian-software/apheleia/pull/100 [#101]: https://github.com/radian-software/apheleia/pull/101 [#105]: https://github.com/radian-software/apheleia/pull/105 [#109]: https://github.com/radian-software/apheleia/issues/109 diff --git a/apheleia.el b/apheleia.el index 332499e..a0acc54 100644 --- a/apheleia.el +++ b/apheleia.el @@ -923,6 +923,7 @@ being run, for diagnostic purposes." (brittany . ("brittany")) (clang-format . ("clang-format")) (dart-format . ("dart" "format")) + (elm-format . ("elm-format" "--yes" "--stdin")) (fish-indent . ("fish_indent")) (gofmt . ("gofmt")) (google-java-format . ("google-java-format" "-")) @@ -1056,6 +1057,7 @@ function: %s" command))) (css-mode . prettier) (dart-mode . dart-format) (elixir-mode . mix-format) + (elm-mode . elm-format) (fish-mode . fish-indent) (go-mode . gofmt) (haskell-mode . brittany) diff --git a/test/formatters/installers/elm-format.bash b/test/formatters/installers/elm-format.bash new file mode 100644 index 0000000..80a735c --- /dev/null +++ b/test/formatters/installers/elm-format.bash @@ -0,0 +1 @@ +npm install -g elm-format diff --git a/test/formatters/samplecode/elm-format/in.elm b/test/formatters/samplecode/elm-format/in.elm new file mode 100644 index 0000000..b412781 --- /dev/null +++ b/test/formatters/samplecode/elm-format/in.elm @@ -0,0 +1,2 @@ +import Html exposing (text) +main = text "Hello!" diff --git a/test/formatters/samplecode/elm-format/out.elm b/test/formatters/samplecode/elm-format/out.elm new file mode 100644 index 0000000..e7b9c6a --- /dev/null +++ b/test/formatters/samplecode/elm-format/out.elm @@ -0,0 +1,7 @@ +module Main exposing (main) + +import Html exposing (text) + + +main = + text "Hello!" |
