From 9c411eef3503981ba9eed814fb2fcb6cad41aa4d Mon Sep 17 00:00:00 2001 From: Veneficium <85629831+veneficium42@users.noreply.github.com> Date: Sun, 29 Dec 2024 23:42:32 +0100 Subject: [PATCH] treefmt: add kdl formatter --- treefmt.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/treefmt.nix b/treefmt.nix index e0195f0..65ba6fa 100644 --- a/treefmt.nix +++ b/treefmt.nix @@ -1,4 +1,4 @@ -{ ... }: +{ pkgs, ... }: { projectRootFile = "flake.nix"; @@ -8,4 +8,12 @@ programs.taplo.enable = true; programs.mdformat.enable = true; programs.shellcheck.enable = true; + + settings.formatter = { + "kdlfmt" = { + command = "${pkgs.kdlfmt}/bin/kdlfmt"; + options = [ "format" ]; + includes = [ "*.kdl" ]; + }; + }; }