2023-03-17 10:00:22 +01:00
|
|
|
{
|
|
|
|
lib,
|
2023-11-06 15:04:08 +01:00
|
|
|
helpers,
|
|
|
|
config,
|
2023-03-17 10:00:22 +01:00
|
|
|
pkgs,
|
|
|
|
...
|
2023-11-06 15:04:08 +01:00
|
|
|
}:
|
|
|
|
with lib; {
|
|
|
|
options.plugins.netman = {
|
|
|
|
enable = mkEnableOption "netman.nvim, a framework to access remote resources";
|
2023-03-26 15:44:45 +02:00
|
|
|
|
2023-11-06 15:04:08 +01:00
|
|
|
package = helpers.mkPackageOption "netman.nvim" pkgs.vimPlugins.netman-nvim;
|
2023-03-17 10:00:22 +01:00
|
|
|
|
2023-11-06 15:04:08 +01:00
|
|
|
neoTreeIntegration = mkEnableOption "support for netman as a neo-tree source";
|
|
|
|
};
|
2023-03-17 10:00:22 +01:00
|
|
|
|
2023-11-06 15:04:08 +01:00
|
|
|
config = let
|
|
|
|
cfg = config.plugins.netman;
|
|
|
|
in
|
|
|
|
mkIf cfg.enable {
|
|
|
|
extraPlugins = [cfg.package];
|
|
|
|
extraConfigLua = ''
|
|
|
|
require("netman")
|
|
|
|
'';
|
2023-03-17 10:00:22 +01:00
|
|
|
|
2023-11-06 15:04:08 +01:00
|
|
|
plugins.neo-tree.extraSources = mkIf cfg.neoTreeIntegration ["netman.ui.neo-tree"];
|
|
|
|
};
|
|
|
|
}
|