/ treefmt.nix
treefmt.nix
1 { lib, pkgs, ... }: 2 3 { 4 tree-root-file = "treefmt.nix"; 5 on-unmatched = "fatal"; 6 7 excludes = [ 8 "*.lock" 9 "*.md" 10 ".envrc" 11 ".gitignore" 12 "LICENSE" 13 ]; 14 15 formatter.nixfmt = { 16 command = lib.getExe pkgs.nixfmt; 17 includes = [ "*.nix" ]; 18 options = [ "--strict" ]; 19 }; 20 21 formatter.rustfmt = { 22 command = lib.getExe pkgs.rustfmt; 23 includes = [ "*.rs" ]; 24 options = [ 25 "--config=skip_children=true" 26 "--edition=2024" 27 ]; 28 }; 29 30 formatter.taplo = { 31 command = lib.getExe pkgs.taplo; 32 includes = [ "*.toml" ]; 33 options = [ 34 "format" 35 "--option=column_width=120" 36 "--option=align_comments=false" 37 ]; 38 }; 39 }