lib/languages: re-add toVimBool

This commit is contained in:
NotAShelf 2024-12-03 00:52:08 +03:00
parent 0650aa31ac
commit 5a5f49f85f
No known key found for this signature in database
GPG key ID: AF26552424E53993

View file

@ -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";
}; };
} }