aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksandar Dimitrov <aleks.dimitrov@gmail.com>2021-10-03 20:09:38 +0200
committerGitHub <noreply@github.com>2021-10-03 11:09:38 -0700
commitf46d65c1790378b3038f8fdce04dc68e7f65672a (patch)
tree5d0f10e9a14e330c0e07bbea459e7503ec89b244
parent92c0fce6b4c5192e567bcb8b4ada06b47746a9a6 (diff)
Fix rustfmt dumping child modules' content into file (#45)
* Fix rustfmt dumping child modules' content into file rustfmt by default analyses all files dependent on the current file, too. The out put of --emit stdout contain all child modules. Apheleia would happily dump that into the currently edited buffer (even though the content came from another file.) The unstable option --skip-children prevents that. It's as yet untested! I've only made a couple of quick sanity checks. * Fix long line
-rw-r--r--apheleia.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/apheleia.el b/apheleia.el
index 21872c9..0fcaf1c 100644
--- a/apheleia.el
+++ b/apheleia.el
@@ -466,7 +466,8 @@ modified from what is written to disk, then don't do anything."
(latexindent . ("latexindent" file))
(ocamlformat . ("ocamlformat" file))
(prettier . (npx "prettier" "--stdin-filepath" filepath))
- (rustfmt . ("rustfmt" "--quiet" "--emit" "stdout" file))
+ (rustfmt . ("rustfmt" "--unstable-features" "--skip-children"
+ "--quiet" "--emit" "stdout" file))
(terraform . ("terraform" "fmt" "-")))
"Alist of code formatting commands.
The keys may be any symbols you want, and the values are