From 158145c49c2bf9e8f6fb035bcdf2d6339b3a9609 Mon Sep 17 00:00:00 2001 From: "Matthieu C." <886074+teto@users.noreply.github.com> Date: Mon, 3 Feb 2025 13:36:53 +0100 Subject: [PATCH] hujsonfmt: json formatter supporting comments I tried jsonfmt5 but it unquoted keys which broke my json --- programs/hujsonfmt.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 programs/hujsonfmt.nix diff --git a/programs/hujsonfmt.nix b/programs/hujsonfmt.nix new file mode 100644 index 0000000..21e0af2 --- /dev/null +++ b/programs/hujsonfmt.nix @@ -0,0 +1,13 @@ +{ mkFormatterModule, ... }: +{ + meta.maintainers = [ ]; + + imports = [ + (mkFormatterModule { + name = "hujsonfmt"; + args = [ "-w" ]; + includes = [ "*.json" "*.jsonc" ]; + }) + ]; +} +