diff --git a/lib/vim-plugin.nix b/lib/vim-plugin.nix index e59b00df..c552eaaa 100644 --- a/lib/vim-plugin.nix +++ b/lib/vim-plugin.nix @@ -36,30 +36,10 @@ with lib; { cfg = config.${namespace}.${name}; - # TODO support nested options! - pluginOptions = - mapAttrs - ( - optName: opt: - opt.option - ) - options; - - globalsFromOptions = - mapAttrs' - (optName: opt: { - name = - if opt.global == null - then optName - else opt.global; - value = cfg.${optName}; - }) - options; - globalsFromSettings = + globals = if (hasAttr "settings" cfg) && (cfg.settings != null) then cfg.settings else {}; - globals = globalsFromOptions // globalsFromSettings; # does this evaluate package? packageOption = @@ -103,7 +83,6 @@ with lib; { } // settingsOption // packageOption - // pluginOptions // extraOptions; imports = let @@ -157,20 +136,4 @@ with lib; { ] ); }; - - mkDefaultOpt = { - type, - global ? null, - description ? null, - example ? null, - default ? null, - ... - }: { - option = mkOption { - type = types.nullOr type; - inherit default description example; - }; - - inherit global; - }; }