From 66005a51c380cc8ca3597b1e092cb343d900ad93 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Wed, 11 Dec 2024 00:08:48 +0300 Subject: [PATCH] wrappr/rc: allow strings in `vim.options.signcolumn` --- modules/wrapper/rc/options.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/wrapper/rc/options.nix b/modules/wrapper/rc/options.nix index 1a7ea8b..980c949 100644 --- a/modules/wrapper/rc/options.nix +++ b/modules/wrapper/rc/options.nix @@ -6,6 +6,7 @@ inherit (lib.options) mkOption mkEnableOption literalMD literalExpression; inherit (lib.strings) optionalString; inherit (lib.types) str bool int enum attrsOf lines listOf either path submodule anything; + inherit (lib.trivial) isBool; inherit (lib.nvim.languages) toVimBool; inherit (lib.nvim.types) dagOf; inherit (lib.nvim.lua) listToLuaTable; @@ -230,9 +231,12 @@ in { }; signcolumn = mkOption { - type = bool; + type = either str bool; default = true; - apply = x: toVimBool x; # convert to a yes/no str + apply = x: + if isBool x + then toVimBool x # convert to a yes/no str + else x; description = "Show the sign column"; }; };