From b552b330772283eb55b911806ca2a1dc0fbea277 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang <59727193+horriblename@users.noreply.github.com> Date: Wed, 10 Jul 2024 00:28:10 +0200 Subject: [PATCH] lz.n: add basic lazy.plugins option --- modules/wrapper/lazy/lazy.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/modules/wrapper/lazy/lazy.nix b/modules/wrapper/lazy/lazy.nix index 0b11ab1..90ae055 100644 --- a/modules/wrapper/lazy/lazy.nix +++ b/modules/wrapper/lazy/lazy.nix @@ -1,6 +1,7 @@ {lib, ...}: let inherit (lib.options) mkOption mkEnableOption; inherit (lib.types) enum; + inherit (lib.nvim.types) lznPluginTableType; in { options.vim.lazy = { enable = mkEnableOption "plugin lazy-loading" // {default = true;}; @@ -10,6 +11,19 @@ in { default = "lz.n"; }; - # plugins = mkOption {}; + plugins = mkOption { + default = {}; + type = lznPluginTableType; + description = "list of plugins to lazy load"; + example = '' + { + toggleterm-nvim = { + package = "toggleterm-nvim"; + after = "require('toggleterm').setup{}"; + cmd = ["ToggleTerm"]; + }; + } + ''; + }; }; }