mirror of
https://github.com/nix-community/flakelight.git
synced 2024-11-07 16:14:06 +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, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkDefault mkEnableOption mkIf;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.flakelight.builtinFormatters =
|
options.flakelight.builtinFormatters =
|
||||||
@ -23,11 +23,11 @@ in
|
|||||||
prettier = "${pkgs.nodePackages.prettier}/bin/prettier --write";
|
prettier = "${pkgs.nodePackages.prettier}/bin/prettier --write";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"*.nix" = nixpkgs-fmt;
|
"*.nix" = mkDefault nixpkgs-fmt;
|
||||||
"*.md" = prettier;
|
"*.md" = mkDefault prettier;
|
||||||
"*.json" = prettier;
|
"*.json" = mkDefault prettier;
|
||||||
"*.yaml" = prettier;
|
"*.yaml" = mkDefault prettier;
|
||||||
"*.yml" = prettier;
|
"*.yml" = mkDefault prettier;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user