plugins/netman: migrate to mkNeovimPlugin

This commit is contained in:
Austin Horstman 2024-12-12 17:59:46 -06:00
parent 1d0404ff43
commit d99bc6ebad
No known key found for this signature in database

View file

@ -1,33 +1,26 @@
{ {
lib, lib,
config,
pkgs,
... ...
}: }:
{ lib.nixvim.neovim-plugin.mkNeovimPlugin {
options.plugins.netman = { name = "netman";
enable = lib.mkEnableOption "netman.nvim, a framework to access remote resources"; originalName = "netman.nvim";
package = "netman-nvim";
package = lib.mkPackageOption pkgs "netman.nvim" { hasSettings = false;
default = [ callSetup = false;
"vimPlugins"
"netman-nvim"
];
};
maintainers = [ lib.maintainers.khaneliman ];
extraOptions = {
neoTreeIntegration = lib.mkEnableOption "support for netman as a neo-tree source"; neoTreeIntegration = lib.mkEnableOption "support for netman as a neo-tree source";
}; };
config = extraConfig = cfg: {
let plugins.netman.luaConfig.content = ''
cfg = config.plugins.netman; require("netman")
in '';
lib.mkIf cfg.enable {
extraPlugins = [ cfg.package ];
extraConfigLua = ''
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" ];
}; };
} }