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
|
|
|
}:
|
2024-05-05 19:39:35 +02:00
|
|
|
with lib;
|
|
|
|
{
|
2023-11-06 15:04:08 +01:00
|
|
|
options.plugins.netman = {
|
|
|
|
enable = mkEnableOption "netman.nvim, a framework to access remote resources";
|
2023-03-26 15:44:45 +02:00
|
|
|
|
2024-09-04 22:00:43 +01:00
|
|
|
package = lib.mkPackageOption pkgs "netman.nvim" {
|
|
|
|
default = [
|
|
|
|
"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
|
|
|
|
2024-05-05 19:39:35 +02:00
|
|
|
config =
|
|
|
|
let
|
|
|
|
cfg = config.plugins.netman;
|
|
|
|
in
|
2023-11-06 15:04:08 +01:00
|
|
|
mkIf cfg.enable {
|
2024-05-05 19:39:35 +02:00
|
|
|
extraPlugins = [ cfg.package ];
|
2023-11-06 15:04:08 +01:00
|
|
|
extraConfigLua = ''
|
|
|
|
require("netman")
|
|
|
|
'';
|
2023-03-17 10:00:22 +01:00
|
|
|
|
2024-05-05 19:39:35 +02:00
|
|
|
plugins.neo-tree.extraSources = mkIf cfg.neoTreeIntegration [ "netman.ui.neo-tree" ];
|
2023-11-06 15:04:08 +01:00
|
|
|
};
|
|
|
|
}
|