Describe the bug
In mdformat module, default for plugins option is _: [].
Its applied with programs.mdformat.finalPackage = cfg.package.withPlugins cfg.plugins;
This override a mdformat package with withPlugins already defined.
To Reproduce
Steps to reproduce the behavior:
treefmt = {
enable = mkDefault true;
config.programs.mdformat = {
enable = true;
package = pkgs.mdformat.withPlugins (plugins: with plugins; [mdformat-frontmatter]);
};
};
treefmt's mdformat doesn't have frontmatter plugin.
Expected behavior
plugins option default to null, and isn't applied if null, rather than applied with an empty plugins list.
Additional context
This is an issue when trying to have the same mdformat command behavior with git hooks and shell.
Describe the bug
In
mdformatmodule, default forpluginsoption is_: [].Its applied with
programs.mdformat.finalPackage = cfg.package.withPlugins cfg.plugins;This override a mdformat package with
withPluginsalready defined.To Reproduce
Steps to reproduce the behavior:
treefmt'smdformatdoesn't havefrontmatterplugin.Expected behavior
pluginsoption default tonull, and isn't applied ifnull, rather than applied with an empty plugins list.Additional context
This is an issue when trying to have the same mdformat command behavior with git hooks and shell.