mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 21:30:51 +00:00
lib/languages: move mkEnable
up & add desc comment
This commit is contained in:
parent
b4c06c71dc
commit
ecbaecfeac
1 changed files with 9 additions and 7 deletions
|
@ -5,6 +5,15 @@
|
|||
inherit (lib.attrsets) listToAttrs;
|
||||
inherit (lib.types) bool;
|
||||
in {
|
||||
# A wrapper around `mkOption` to create a boolean option that is
|
||||
# used for Language Server modules.
|
||||
mkEnable = desc:
|
||||
mkOption {
|
||||
description = "Turn on ${desc} for enabled languages by default";
|
||||
type = bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
# Converts a boolean to a yes/no string. This is used in lots of
|
||||
# configuration formats.
|
||||
diagnosticsToLua = {
|
||||
|
@ -27,11 +36,4 @@ in {
|
|||
value = diagnosticsProviders.${type}.nullConfig package;
|
||||
})
|
||||
config);
|
||||
|
||||
mkEnable = desc:
|
||||
mkOption {
|
||||
description = "Turn on ${desc} for enabled languages by default";
|
||||
type = bool;
|
||||
default = false;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue