diff --git a/lib/neovim-plugin.nix b/lib/neovim-plugin.nix index 34ec996bc7..064fcd0c2c 100644 --- a/lib/neovim-plugin.nix +++ b/lib/neovim-plugin.nix @@ -188,46 +188,29 @@ ]; plugins.lz-n = lib.mkIf config.plugins.lz-n.enable { plugins = [ - { - __unkeyed-1 = originalName; - # Use provided after, otherwise fallback to normal lua content - after = - if cfg.lazyLoad.settings.after != null then - cfg.lazyLoad.settings.after - else - # We need to wrap it in a function so it doesn't execute immediately - "function()\n " + cfg.luaConfig.content + " \nend"; - colorscheme = - if cfg.lazyLoad.settings.colorscheme != null then - cfg.lazyLoad.settings.colorscheme - else if (isColorscheme && colorscheme != null) then - colorscheme - else - null; - - inherit (cfg.lazyLoad.settings) - enabled - priority - before - beforeAll - event - cmd - ft - keys - ; - extraSettings = lib.removeAttrs cfg.lazyLoad.settings [ - "enabled" - "priority" - "before" - "beforeAll" - "event" - "cmd" - "ft" - "keys" - "colorscheme" + ( + { + __unkeyed-1 = originalName; + # Use provided after, otherwise fallback to normal lua content + after = + if cfg.lazyLoad.settings.after != null then + cfg.lazyLoad.settings.after + else + # We need to wrap it in a function so it doesn't execute immediately + "function()\n " + cfg.luaConfig.content + " \nend"; + colorscheme = + if cfg.lazyLoad.settings.colorscheme != null then + cfg.lazyLoad.settings.colorscheme + else if (isColorscheme && colorscheme != null) then + colorscheme + else + null; + } + // (lib.removeAttrs cfg.lazyLoad.settings [ "after" - ]; - } + "colorscheme" + ]) + ) ]; }; })