wrappr/rc: allow strings in vim.options.signcolumn

This commit is contained in:
NotAShelf 2024-12-11 00:08:48 +03:00
parent c19c925f1d
commit 66005a51c3
No known key found for this signature in database
GPG key ID: AF26552424E53993

View file

@ -6,6 +6,7 @@
inherit (lib.options) mkOption mkEnableOption literalMD literalExpression; inherit (lib.options) mkOption mkEnableOption literalMD literalExpression;
inherit (lib.strings) optionalString; inherit (lib.strings) optionalString;
inherit (lib.types) str bool int enum attrsOf lines listOf either path submodule anything; 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.languages) toVimBool;
inherit (lib.nvim.types) dagOf; inherit (lib.nvim.types) dagOf;
inherit (lib.nvim.lua) listToLuaTable; inherit (lib.nvim.lua) listToLuaTable;
@ -230,9 +231,12 @@ in {
}; };
signcolumn = mkOption { signcolumn = mkOption {
type = bool; type = either str bool;
default = true; 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"; description = "Show the sign column";
}; };
}; };