From 22e48b831d64ca1647ae28f9e9485378577ea4f8 Mon Sep 17 00:00:00 2001 From: Emily Bourke Date: Sun, 10 Sep 2023 10:23:54 +0100 Subject: [PATCH] scalafmt: Add --stdout as workaround (#238) Sometimes, scalafmt does not produce formatted output to stdout with only the `--stdin` flag provided. For example, this happens when there are no formatting changes required to be made to the file. As-is, this causes the formatter to clear the buffer when there are no formatting changes required. Fix by adding the `--stdout` flag. See https://github.com/scalameta/scalafmt/issues/3632 for more information. --- format-all.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/format-all.el b/format-all.el index a5609b7d..7773f864 100644 --- a/format-all.el +++ b/format-all.el @@ -1266,7 +1266,7 @@ Consult the existing formatters for examples of BODY." (:features) (:format (format-all--buffer-easy - executable "--stdin" "--non-interactive" "--quiet"))) + executable "--stdin" "--non-interactive" "--quiet" "--stdout"))) (define-format-all-formatter shfmt (:executable "shfmt")