-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtreefmt.nix
More file actions
36 lines (34 loc) · 800 Bytes
/
treefmt.nix
File metadata and controls
36 lines (34 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ rust' }:
{ lib, ... }:
{
projectRootFile = "flake.nix";
programs = {
rustfmt = {
enable = true;
edition = (builtins.fromTOML (builtins.readFile ./Cargo.toml)).workspace.package.edition;
};
nixfmt = {
enable = true;
strict = true;
width = 100;
};
mdformat = {
enable = true;
settings = {
end-of-line = "lf";
number = false;
wrap = 100;
};
};
};
settings = {
global.excludes = [ ".jj" ];
formatter = {
rustfmt.command = lib.getExe' rust' "rustfmt";
nixfmt.options = [
"--indent"
"4"
];
};
};
}