From d3cd5acc99dfdee557e1ec3b08f844020c6bc19c Mon Sep 17 00:00:00 2001 From: dawn Date: Tue, 21 Jul 2026 02:31:45 +0300 Subject: [PATCH] nix/treefmt: fix prettier plugin resolution --- flake.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 303af839e..2396d3dce 100644 --- a/flake.nix +++ b/flake.nix @@ -297,7 +297,18 @@ }; prettier = { - command = pkgs.lib.getExe pkgs.prettier; + command = pkgs.writeShellScript "prettier-wrapper" '' + cd web + args=() + for arg in "$@"; do + if [[ "$arg" == web/* ]]; then + args+=("''${arg#web/}") + else + args+=("$arg") + fi + done + exec ${pkgs.lib.getExe pkgs.prettier} "''${args[@]}" + ''; options = ["-w"]; includes = [ "web/**/*.cjs" @@ -316,6 +327,10 @@ "web/**/*.yaml" "web/**/*.yml" ]; + excludes = [ + "web/static/**" + "web/src/lib/api/lexicons/**" + ]; }; }; }; -- 2.51.2