Skip to content

Commit

Permalink
plugins/netman: remove with lib; and helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman committed Dec 12, 2024
1 parent 6fcf389 commit 1d0404f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions plugins/by-name/netman/default.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
{
lib,
helpers,
config,
pkgs,
...
}:
with lib;
{
options.plugins.netman = {
enable = mkEnableOption "netman.nvim, a framework to access remote resources";
enable = lib.mkEnableOption "netman.nvim, a framework to access remote resources";

package = lib.mkPackageOption pkgs "netman.nvim" {
default = [
Expand All @@ -17,19 +15,19 @@ with lib;
];
};

neoTreeIntegration = mkEnableOption "support for netman as a neo-tree source";
neoTreeIntegration = lib.mkEnableOption "support for netman as a neo-tree source";
};

config =
let
cfg = config.plugins.netman;
in
mkIf cfg.enable {
lib.mkIf cfg.enable {
extraPlugins = [ cfg.package ];
extraConfigLua = ''
require("netman")
'';

plugins.neo-tree.extraSources = mkIf cfg.neoTreeIntegration [ "netman.ui.neo-tree" ];
plugins.neo-tree.extraSources = lib.mkIf cfg.neoTreeIntegration [ "netman.ui.neo-tree" ];
};
}

0 comments on commit 1d0404f

Please sign in to comment.