Skip to content

Commit 42b1ba0

Browse files
authored
Merge pull request #559 from f1rstlady/fourmolu-settings
fix(fourmolu): refer to its own settings
2 parents 25d4946 + 48ebf15 commit 42b1ba0

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

modules/hooks.nix

+12-1
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,17 @@ in
603603
};
604604
};
605605
};
606+
fourmolu = mkOption {
607+
description = "fourmolu hook";
608+
type = types.submodule {
609+
imports = [ hookModule ];
610+
options.settings.defaultExtensions = mkOption {
611+
type = types.listOf types.str;
612+
description = "Haskell language extensions to enable.";
613+
default = [ ];
614+
};
615+
};
616+
};
606617
golines = mkOption {
607618
description = "golines hook";
608619
type = types.submodule {
@@ -2744,7 +2755,7 @@ in
27442755
package = tools.fourmolu;
27452756
entry =
27462757
"${hooks.fourmolu.package}/bin/fourmolu --mode inplace ${
2747-
lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.ormolu.settings.defaultExtensions)
2758+
lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.fourmolu.settings.defaultExtensions)
27482759
}";
27492760
files = "\\.l?hs(-boot)?$";
27502761
};

0 commit comments

Comments
 (0)