lib/helpers: build recursively

This commit is contained in:
Matt Sturgeon 2024-07-28 22:30:11 +01:00
parent a655679ecc
commit 0e98d9cf1e
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
8 changed files with 68 additions and 96 deletions

View file

@ -5,30 +5,21 @@
...
}:
let
nixvimBuilders = import ./builders.nix { inherit lib pkgs; };
nixvimTypes = import ./types.nix { inherit lib nixvimOptions; };
nixvimUtils = import ./utils.nix { inherit lib nixvimTypes _nixvimTests; };
nixvimOptions = import ./options.nix { inherit lib nixvimTypes nixvimUtils; };
nixvimDeprecation = import ./deprecation.nix { inherit lib; };
# Build helpers recursively
helpers =
{
autocmd = import ./autocmd-helpers.nix { inherit lib helpers; };
keymaps = import ./keymap-helpers.nix { inherit lib helpers; };
lua = import ./to-lua.nix { inherit lib; };
toLuaObject = helpers.lua.toLua;
maintainers = import ./maintainers.nix;
neovim-plugin = import ./neovim-plugin.nix { inherit lib helpers; };
nixvimTypes = import ./types.nix { inherit lib helpers; };
vim-plugin = import ./vim-plugin.nix { inherit lib helpers; };
}
// import ./builders.nix { inherit lib pkgs; }
// import ./deprecation.nix { inherit lib; }
// import ./options.nix { inherit lib helpers; }
// import ./utils.nix { inherit lib helpers _nixvimTests; };
in
rec {
maintainers = import ./maintainers.nix;
lua = import ./to-lua.nix { inherit lib; };
keymaps = import ./keymap-helpers.nix { inherit lib nixvimOptions nixvimTypes; };
autocmd = import ./autocmd-helpers.nix { inherit lib nixvimOptions nixvimTypes; };
neovim-plugin = import ./neovim-plugin.nix {
inherit
lib
nixvimOptions
nixvimUtils
toLuaObject
;
};
vim-plugin = import ./vim-plugin.nix { inherit lib nixvimOptions nixvimUtils; };
inherit nixvimTypes;
toLuaObject = lua.toLua;
}
// nixvimUtils
// nixvimOptions
// nixvimBuilders
// nixvimDeprecation
helpers