mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 02:11:33 +00:00
clipboard: fix bad list type vim.o
This commit is contained in:
parent
f9ee813a23
commit
ef53c20678
1 changed files with 6 additions and 2 deletions
|
@ -4,9 +4,10 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
inherit (builtins) typeOf concatStringsSep;
|
||||||
inherit (lib.modules) mkIf;
|
inherit (lib.modules) mkIf;
|
||||||
inherit (lib.options) mkOption mkEnableOption mkPackageOption;
|
inherit (lib.options) mkOption mkEnableOption mkPackageOption;
|
||||||
inherit (lib.types) nullOr either str listOf submodule;
|
inherit (lib.types) either str listOf submodule;
|
||||||
inherit (lib.attrsets) mapAttrs mapAttrsToList filterAttrs;
|
inherit (lib.attrsets) mapAttrs mapAttrsToList filterAttrs;
|
||||||
cfg = config.vim.clipboard;
|
cfg = config.vim.clipboard;
|
||||||
in {
|
in {
|
||||||
|
@ -71,7 +72,10 @@ in {
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
vim = {
|
vim = {
|
||||||
options.clipboard = cfg.registers;
|
options.clipboard =
|
||||||
|
if typeOf cfg.registers == "list"
|
||||||
|
then concatStringsSep "," cfg.registers
|
||||||
|
else cfg.registers;
|
||||||
extraPackages = mapAttrsToList (_: v: v.package) (
|
extraPackages = mapAttrsToList (_: v: v.package) (
|
||||||
filterAttrs (_: v: v.enable && v.package != null) cfg.providers
|
filterAttrs (_: v: v.enable && v.package != null) cfg.providers
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue