diff --git a/modules/lazyload.nix b/modules/lazyload.nix index 17bb325f..832d4257 100644 --- a/modules/lazyload.nix +++ b/modules/lazyload.nix @@ -26,5 +26,33 @@ in ''; } ]; + warnings = + let + ignoredPackages = [ + # removed + "treesitter-playground" + # renamed + "surround" + "null-ls" + "wilder-nvim" + ]; + + pluginsWithLazyLoad = builtins.filter ( + x: + !(lib.elem x ignoredPackages) + && lib.hasAttr "lazyLoad" config.plugins.${x} + && config.plugins.${x}.lazyLoad.enable + ) (builtins.attrNames config.plugins); + count = builtins.length pluginsWithLazyLoad; + in + lib.optionals (count > 0 && !config.plugins.lz-n.enable) [ + '' + You have enabled lazy loading support for the following plugins but have not enabled a lazy loading provider. + ${lib.concatImapStringsSep "\n" (i: x: "${toString i}. plugins.${x}") pluginsWithLazyLoad} + + Currently supported lazy providers: + - lz-n + '' + ]; }; }