Skip to content

Commit bc1f009

Browse files
committed
chore(treefmt): add nixf-diagnose
1 parent e551e92 commit bc1f009

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

flake-modules/treefmt.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# https://github.com/NixOS/nixpkgs/blob/master/ci/default.nix
12
{ inputs, ... }:
23
{
34
imports = [ inputs.treefmt-nix.flakeModule ];
@@ -10,6 +11,7 @@
1011
buf.enable = true;
1112
gofmt.enable = true;
1213
google-java-format.enable = true;
14+
nixf-diagnose.enable = true;
1315
nixfmt.enable = true;
1416
prettier.enable = true;
1517
ruff-check.enable = true;
@@ -19,6 +21,14 @@
1921
typstyle.enable = true;
2022
yamlfmt.enable = true;
2123
};
24+
settings.formatter.nixf-diagnose = {
25+
# Ensure nixfmt cleans up after nixf-diagnose.
26+
priority = -1;
27+
options = [
28+
"--auto-fix"
29+
"--ignore=sema-unused-def-let"
30+
];
31+
};
2232
};
2333
packages.treefmt-nix = config.treefmt.build.wrapper;
2434
};

home/mlenz/common/packages/workstation.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ lib.mkIf config.custom.profile.isWorkstation {
5454
nixd
5555
nixf
5656
nixt
57+
nixf-diagnose
5758
nixfmt
5859
alejandra
5960
nix-update

0 commit comments

Comments
 (0)