mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 09:48:42 +02:00
misc: refactor imports, prefer adding helpers
to args rather than importing it
This commit is contained in:
parent
541b694873
commit
b6724702b4
160 changed files with 697 additions and 736 deletions
|
@ -1,29 +1,28 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
} @ args: let
|
||||
helpers = import ../helpers.nix args;
|
||||
in
|
||||
with lib; {
|
||||
options.plugins.netman = {
|
||||
enable = mkEnableOption "netman.nvim, a framework to access remote resources";
|
||||
}:
|
||||
with lib; {
|
||||
options.plugins.netman = {
|
||||
enable = mkEnableOption "netman.nvim, a framework to access remote resources";
|
||||
|
||||
package = helpers.mkPackageOption "netman.nvim" pkgs.vimPlugins.netman-nvim;
|
||||
package = helpers.mkPackageOption "netman.nvim" pkgs.vimPlugins.netman-nvim;
|
||||
|
||||
neoTreeIntegration = mkEnableOption "support for netman as a neo-tree source";
|
||||
neoTreeIntegration = mkEnableOption "support for netman as a neo-tree source";
|
||||
};
|
||||
|
||||
config = let
|
||||
cfg = config.plugins.netman;
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
extraPlugins = [cfg.package];
|
||||
extraConfigLua = ''
|
||||
require("netman")
|
||||
'';
|
||||
|
||||
plugins.neo-tree.extraSources = mkIf cfg.neoTreeIntegration ["netman.ui.neo-tree"];
|
||||
};
|
||||
|
||||
config = let
|
||||
cfg = config.plugins.netman;
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
extraPlugins = [cfg.package];
|
||||
extraConfigLua = ''
|
||||
require("netman")
|
||||
'';
|
||||
|
||||
plugins.neo-tree.extraSources = mkIf cfg.neoTreeIntegration ["netman.ui.neo-tree"];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue