mirror of
https://github.com/nix-community/flakelight.git
synced 2024-11-24 16:33:21 +01:00
Use mkDefault for default formatters
This enables easier overriding of formatting defaults.
This commit is contained in:
parent
40af04adb6
commit
db9da2b1f7
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user