From 31e5e715321a172cdbd1ba74220d51fae41a3df2 Mon Sep 17 00:00:00 2001 From: seth Date: Fri, 5 Jul 2024 20:13:36 -0400 Subject: nix: add dprintPlugins --- treefmt.nix | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) (limited to 'treefmt.nix') 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; }; -- cgit v1.2.3