1
1
forked from extern/flakelight

Use mkDefault for default formatters

This enables easier overriding of formatting defaults.
This commit is contained in:
Archit Gupta 2024-02-19 00:11:19 -08:00
parent 40af04adb6
commit db9da2b1f7

View File

@ -4,7 +4,7 @@
{ config, lib, ... }:
let
inherit (lib) mkEnableOption mkIf;
inherit (lib) mkDefault mkEnableOption mkIf;
in
{
options.flakelight.builtinFormatters =
@ -23,11 +23,11 @@ in
prettier = "${pkgs.nodePackages.prettier}/bin/prettier --write";
in
{
"*.nix" = nixpkgs-fmt;
"*.md" = prettier;
"*.json" = prettier;
"*.yaml" = prettier;
"*.yml" = prettier;
"*.nix" = mkDefault nixpkgs-fmt;
"*.md" = mkDefault prettier;
"*.json" = mkDefault prettier;
"*.yaml" = mkDefault prettier;
"*.yml" = mkDefault prettier;
};
};
}