From d99bc6ebadce99dcb8b294c31fac96329b3bdf2e Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Thu, 12 Dec 2024 17:59:46 -0600 Subject: [PATCH] plugins/netman: migrate to mkNeovimPlugin --- plugins/by-name/netman/default.nix | 37 ++++++++++++------------------ 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/plugins/by-name/netman/default.nix b/plugins/by-name/netman/default.nix index b0bfa55755..7d8805f2db 100644 --- a/plugins/by-name/netman/default.nix +++ b/plugins/by-name/netman/default.nix @@ -1,33 +1,26 @@ { lib, - config, - pkgs, ... }: -{ - options.plugins.netman = { - enable = lib.mkEnableOption "netman.nvim, a framework to access remote resources"; +lib.nixvim.neovim-plugin.mkNeovimPlugin { + name = "netman"; + originalName = "netman.nvim"; + package = "netman-nvim"; + + hasSettings = false; + callSetup = false; - package = lib.mkPackageOption pkgs "netman.nvim" { - default = [ - "vimPlugins" - "netman-nvim" - ]; - }; + maintainers = [ lib.maintainers.khaneliman ]; + extraOptions = { neoTreeIntegration = lib.mkEnableOption "support for netman as a neo-tree source"; }; - config = - let - cfg = config.plugins.netman; - in - lib.mkIf cfg.enable { - extraPlugins = [ cfg.package ]; - extraConfigLua = '' - require("netman") - ''; + extraConfig = cfg: { + plugins.netman.luaConfig.content = '' + require("netman") + ''; - plugins.neo-tree.extraSources = lib.mkIf cfg.neoTreeIntegration [ "netman.ui.neo-tree" ]; - }; + plugins.neo-tree.extraSources = lib.mkIf cfg.neoTreeIntegration [ "netman.ui.neo-tree" ]; + }; }