Skip to content

Commit

Permalink
plugins/netman: migrate to mkNeovimPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman committed Dec 12, 2024
1 parent 1d0404f commit d99bc6e
Showing 1 changed file with 15 additions and 22 deletions.
37 changes: 15 additions & 22 deletions plugins/by-name/netman/default.nix
Original file line number Diff line number Diff line change
@@ -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" ];
};
}

0 comments on commit d99bc6e

Please sign in to comment.