mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-12-02 09:27:18 +00:00
27 lines
631 B
Nix
27 lines
631 B
Nix
|
{lib}:
|
||
|
with lib; let
|
||
|
diagnosticSubmodule = {...}: {
|
||
|
options = {
|
||
|
type = mkOption {
|
||
|
description = "Type of diagnostic to enable";
|
||
|
type = attrNames diagnostics;
|
||
|
};
|
||
|
package = mkOption {
|
||
|
description = "Diagnostics package";
|
||
|
type = types.package;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
in {
|
||
|
diagnostics = {
|
||
|
langDesc,
|
||
|
diagnostics,
|
||
|
defaultDiagnostics,
|
||
|
}:
|
||
|
mkOption {
|
||
|
description = "List of ${langDesc} diagnostics to enable";
|
||
|
type = with types; listOf (either (enum (attrNames diagnostics)) (submodule diagnosticSubmodule));
|
||
|
default = defaultDiagnostics;
|
||
|
};
|
||
|
}
|