From cb4693b806827af6d800d61752e459445ed06296 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 6 Sep 2020 15:27:42 +0300 Subject: fix(emacs): use a shell wrapper to set 2018 edition for rustfmt --- bin/rustfmt-2018 | 4 ++++ emacs.d/init.el | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100755 bin/rustfmt-2018 diff --git a/bin/rustfmt-2018 b/bin/rustfmt-2018 new file mode 100755 index 0000000..ec52655 --- /dev/null +++ b/bin/rustfmt-2018 @@ -0,0 +1,4 @@ +#!/bin/sh + +set -eu +rustfmt --edition 2018 "$@" diff --git a/emacs.d/init.el b/emacs.d/init.el index e4c09be..52bcb38 100644 --- a/emacs.d/init.el +++ b/emacs.d/init.el @@ -68,11 +68,12 @@ (use-package rust-mode :config - (setq-default rust-format-on-save t)) + (setq-default rust-format-on-save t) + (setq-default rust-rustfmt-bin "~/liw-dot-files/bin/rustfmt-2018")) (use-package flycheck :config - (setq-default flycheck-disabled-checkers '(ptyhon-pylint))) + (setq-default flycheck-disabled-checkers '(python-pylint))) (use-package flycheck-rust) -- cgit v1.2.1