From cdef7656ffc7bd209ba7fc7c3e9279af62e90e34 Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Fri, 28 Jun 2024 09:27:48 -0600 Subject: [PATCH] all: use treefmt for formatting everything --- lib/default.nix | 2 ++ treefmt.toml | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 treefmt.toml diff --git a/lib/default.nix b/lib/default.nix index 3a4a1a1..9b7faf5 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -101,6 +101,8 @@ let ssh-to-age ssh-to-pgp statix + treefmt2 + perlPackages.PerlTidy ]; }; diff --git a/treefmt.toml b/treefmt.toml new file mode 100644 index 0000000..fd34c9f --- /dev/null +++ b/treefmt.toml @@ -0,0 +1,28 @@ +[formatter.statix] +command = "statix" +options = ["check"] +priority = 1 + +[formatter.deadnix] +command = "deadnix" +options = ["-f"] +includes = [ "*.nix" ] +priority = 2 + +[formatter.nix] +command = "nix" +options = ["fmt"] +includes = ["*.nix"] +priority = 3 + +[formatter.shfmt] +command = "shfmt" +options = ["-w"] +includes = ["*.sh", "bin/*"] +priority = 1 + +[formatter.perltidy] +command = "perltidy" +options = ["-b"] +includes = ["*.pl", "*.PL"] +priority = 1 \ No newline at end of file