mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-19 09:49:48 +01: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.attrsets) listToAttrs;
|
||||||
inherit (lib.types) bool;
|
inherit (lib.types) bool;
|
||||||
in {
|
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
|
# Converts a boolean to a yes/no string. This is used in lots of
|
||||||
# configuration formats.
|
# configuration formats.
|
||||||
diagnosticsToLua = {
|
diagnosticsToLua = {
|
||||||
|
@ -27,11 +36,4 @@ in {
|
||||||
value = diagnosticsProviders.${type}.nullConfig package;
|
value = diagnosticsProviders.${type}.nullConfig package;
|
||||||
})
|
})
|
||||||
config);
|
config);
|
||||||
|
|
||||||
mkEnable = desc:
|
|
||||||
mkOption {
|
|
||||||
description = "Turn on ${desc} for enabled languages by default";
|
|
||||||
type = bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue