about summary refs log tree commit diff
path: root/pkgs/aszlig/vim
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2024-03-25 11:56:56 +0100
committeraszlig <aszlig@nix.build>2024-03-25 12:12:33 +0100
commited98f10190876557a0f0fd0d3c91f9745d34d911 (patch)
treed83ae99981c25d777ed46865e5fca406666298cc /pkgs/aszlig/vim
parent061b9452ca81f2e96373973d4e675f40e92fd7dd (diff)
vim: Don't rustfmt without an explicit config
This is getting annoying when contributing to external projects that
don't have a rustfmt.toml, because I constantly forget to disable it for
a buffer and then get a massive diff that I need to revert.

My own projects all have a rustfmt.toml anyway, so there really is no
reason to do it by default nor have a custom rustfmt config in Vuizvui.

Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'pkgs/aszlig/vim')
-rw-r--r--pkgs/aszlig/vim/default.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/aszlig/vim/default.nix b/pkgs/aszlig/vim/default.nix
index 4bbc8107..641c39ea 100644
--- a/pkgs/aszlig/vim/default.nix
+++ b/pkgs/aszlig/vim/default.nix
@@ -604,8 +604,10 @@ let
     if !executable('rustc')
       let g:rustc_path = '${rustc}/bin/rustc'
     endif
-    let g:rustfmt_command = '${rustfmt}/bin/rustfmt'
-    let g:rustfmt_autosave = 1
+    let g:rustfmt_command = '${rustfmt.override {
+      asNightly = true;
+    }}/bin/rustfmt'
+    let g:rustfmt_autosave_if_config_present = 1
     let g:rust_recommended_style = 0
   '';