From 5a5f49f85f1d667c78e731592c93084176683ae0 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 3 Dec 2024 00:52:08 +0300 Subject: [PATCH] lib/languages: re-add `toVimBool` --- lib/languages.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/languages.nix b/lib/languages.nix index 52f1b5b..56c225d 100644 --- a/lib/languages.nix +++ b/lib/languages.nix @@ -6,7 +6,12 @@ inherit (lib.nvim.attrsets) mapListToAttrs; in { # 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 = { lang, config, @@ -30,8 +35,8 @@ in { mkEnable = desc: mkOption { - description = "Turn on ${desc} for enabled languages by default"; - type = bool; default = false; + type = bool; + description = "Turn on ${desc} for enabled languages by default"; }; }