Add a `rustfmt` config to my dotfiles, though admittedly I'm not sure if it completely works.

This commit is contained in:
Whovian NTSN 2024-06-26 06:28:32 -04:00
parent 588779fa95
commit b9a711d510
2 changed files with 16 additions and 0 deletions

View File

@ -18,6 +18,7 @@
./dotfiles.nix # home.file
./variables.nix # home.sessionVariables
./aliases.nix # home.shellAliases
./rust.nix # Should be my `rustfmt` config.
];
home = {

15
home/rust.nix Normal file
View File

@ -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
'';
};
};
}