diff --git a/lib/neovim-plugin.nix b/lib/neovim-plugin.nix index 0f40fd41..be5c7bc4 100644 --- a/lib/neovim-plugin.nix +++ b/lib/neovim-plugin.nix @@ -114,28 +114,11 @@ internal = true; }; - lazyLoad = lib.mkOption { - default = { - enable = false; - }; - description = '' - Lazy load configuration settings. - ''; - type = lib.types.submodule { - options = { - enable = lib.mkOption { - default = false; - type = lib.types.bool; - description = '' - Whether to lazy load the plugin. - - If you enable this, the plugin's lua configuration will need to be manually loaded by other means. - - A usage would be passing the plugin's luaConfig to the `plugins.lz-n.plugins` configuration. - ''; - }; - }; - }; + lazyLoad = lib.nixvim.mkLazyLoadOption { + inherit originalName; + lazyLoadDefaults = ( + lib.optionalAttrs (isColorscheme && colorscheme != null) { inherit colorscheme; } + ); }; } // lib.optionalAttrs hasSettings { diff --git a/lib/options.nix b/lib/options.nix index 822abb8a..1e4cafe5 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -412,13 +412,11 @@ rec { Equivalence: lz.n => ft; lazy.nvim => ft ''; - keys = - mkNullable (types.listOf lib.nixvim.keymaps.mapOptionSubmodule) (lazyLoadDefaults.keys or null) - '' - Lazy-load on key mapping. Use the same format as `config.keymaps`. + keys = mkListOf (types.attrsOf types.anything) (lazyLoadDefaults.keys or null) '' + Lazy-load on key mapping. - Equivalence: lz.n => keys; lazy.nvim => keys - ''; + Equivalence: lz.n => keys; lazy.nvim => keys + ''; colorscheme = mkNullable triggerType (lazyLoadDefaults.colorscheme or null) '' Lazy-load on colorscheme.