mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-12-27 21:22:23 +00:00
lib/languages: re-add toVimBool
This commit is contained in:
parent
0650aa31ac
commit
5a5f49f85f
1 changed files with 8 additions and 3 deletions
|
@ -6,7 +6,12 @@
|
||||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||||
in {
|
in {
|
||||||
# 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, and is not covered by `toLuaObject`
|
||||||
|
toVimBool = bool:
|
||||||
|
if bool
|
||||||
|
then "yes"
|
||||||
|
else "no";
|
||||||
|
|
||||||
diagnosticsToLua = {
|
diagnosticsToLua = {
|
||||||
lang,
|
lang,
|
||||||
config,
|
config,
|
||||||
|
@ -30,8 +35,8 @@ in {
|
||||||
|
|
||||||
mkEnable = desc:
|
mkEnable = desc:
|
||||||
mkOption {
|
mkOption {
|
||||||
description = "Turn on ${desc} for enabled languages by default";
|
|
||||||
type = bool;
|
|
||||||
default = false;
|
default = false;
|
||||||
|
type = bool;
|
||||||
|
description = "Turn on ${desc} for enabled languages by default";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue