mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 16:39:00 +02:00
plugins/netman: migrate to mkNeovimPlugin
This commit is contained in:
parent
1d0404ff43
commit
d99bc6ebad
1 changed files with 15 additions and 22 deletions
|
@ -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" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue