summaryrefslogtreecommitdiff
path: root/treefmt.nix
diff options
context:
space:
mode:
Diffstat (limited to 'treefmt.nix')
-rw-r--r--treefmt.nix36
1 files changed, 35 insertions, 1 deletions
diff --git a/treefmt.nix b/treefmt.nix
index a2c5477..b0cf63e 100644
--- a/treefmt.nix
+++ b/treefmt.nix
@@ -1,9 +1,43 @@
+{ pkgs, ... }:
+let
+ dprintPlugins = pkgs.callPackage ./dprintPlugins { };
+in
{
projectRootFile = ".git/config";
programs = {
+ dprint = {
+ enable = true;
+
+ settings = {
+ useTabs = true;
+
+ plugins = map toString [
+ dprintPlugins.json
+ dprintPlugins.markdown
+ dprintPlugins.typescript
+ dprintPlugins."g-plane/malva"
+ dprintPlugins."g-plane/markup_fmt"
+ ];
+
+ includes = [ "**/*.{css,json,md,ts,tsx}" ];
+
+ json = {
+ deno = true;
+ };
+
+ markdown = { };
+
+ typescript = {
+ deno = true;
+ };
+
+ malva = { };
+ markup = { };
+ };
+ };
+
deadnix.enable = true;
- deno.enable = true;
nixfmt.enable = true;
statix.enable = true;
};