Skip to content

Commit

Permalink
modernize treefmt configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Jul 8, 2024
1 parent bd22550 commit 28c2bf7
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions treefmt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
perSystem = _: {
treefmt = {
# Used to find the project root
projectRootFile = "flake.lock";
projectRootFile = ".git/config";

programs = {
deadnix.enable = true;
Expand All @@ -20,10 +20,14 @@
statix.enable = true;
};

settings.formatter = {
shellcheck.includes = [ "*.sh" "direnvrc" ];
shfmt.includes = [ "*.sh" "direnvrc" ];
};
settings.formatter =
let
shellIncludes = [ "*.sh" "direnvrc" ];
in
{
shellcheck.includes = shellIncludes;
shfmt.includes = shellIncludes;
};
};
};
}

0 comments on commit 28c2bf7

Please sign in to comment.