treefmt.nix 674 B

123456789101112131415161718192021222324252627
  1. {
  2. projectRootFile = "Cargo.toml";
  3. programs = {
  4. nixfmt.enable = true; # nix
  5. statix.enable = true; # nix static analysis
  6. deadnix.enable = true; # find dead nix code
  7. rustfmt.enable = true; # rust
  8. shellcheck.enable = true; # bash/shell
  9. taplo.enable = true; # toml
  10. yamlfmt.enable = true; # yaml
  11. };
  12. settings = {
  13. formatter = {
  14. shellcheck = {
  15. includes = [
  16. "*.sh"
  17. "./completions/bash/eza"
  18. ];
  19. excludes = [ ".envrc" ];
  20. };
  21. rustfmt.excludes = [ "src/options/flags.rs" ];
  22. taplo.excludes = [ "tests/ptests/*.toml" ];
  23. yamlfmt.excludes = [ "./powertest.yaml" ];
  24. };
  25. };
  26. }