aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRebecca Turner <rbt@sent.as>2024-03-27 12:28:44 -0700
committerRebecca Turner <rbt@sent.as>2024-03-29 22:57:43 -0700
commit655dae03deaba8b74076230119b211ca19757b5d (patch)
tree73c4e8b8b8073ac34a276cc56d549e3210eb5af6
parent2a98ba8b97c9ff52519633c32cf63716827d6e7c (diff)
Add `treefmt` `pre-commit` hook
This lets us use different formatters for different filetypes. Change-Id: Ib52383dd5097c8919a65e299aca2b5a55412223c
-rw-r--r--flake.nix4
-rw-r--r--treefmt.toml1
2 files changed, 5 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index be163e386..70b83c251 100644
--- a/flake.nix
+++ b/flake.nix
@@ -331,6 +331,10 @@
stages = [ "commit" ];
excludes = [ "^tests/functional/lang/" ];
};
+ treefmt = {
+ enable = true;
+ settings.formatters = [ ];
+ };
};
}) pre-commit-hooks.lib;
};
diff --git a/treefmt.toml b/treefmt.toml
new file mode 100644
index 000000000..81df72cc2
--- /dev/null
+++ b/treefmt.toml
@@ -0,0 +1 @@
+[formatter]