From b9a711d510c80a35fd58a6b7b1c18259688ce6f6 Mon Sep 17 00:00:00 2001 From: Whovian9369 Date: Wed, 26 Jun 2024 06:28:32 -0400 Subject: [PATCH] Add a `rustfmt` config to my dotfiles, though admittedly I'm not sure if it completely works. --- home/home.nix | 1 + home/rust.nix | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 home/rust.nix diff --git a/home/home.nix b/home/home.nix index 29a10a3..025107d 100644 --- a/home/home.nix +++ b/home/home.nix @@ -18,6 +18,7 @@ ./dotfiles.nix # home.file ./variables.nix # home.sessionVariables ./aliases.nix # home.shellAliases + ./rust.nix # Should be my `rustfmt` config. ]; home = { diff --git a/home/rust.nix b/home/rust.nix new file mode 100644 index 0000000..dd483b6 --- /dev/null +++ b/home/rust.nix @@ -0,0 +1,15 @@ +{ + xdg.configFile = { + rustfmt = { + enable = true; + target = "rustfmt/rustfmt.toml"; + text = '' + tab_spaces = 2 + hard_tabs = false + # indent_style = "Block" + # TODO: "Unstable" as of rustfmt 1.7.0 + reorder_imports = true + ''; + }; + }; +}