nix-community.nixvim/lib/helpers.nix
Matt Sturgeon 040bab5f55
lib/helpers: call with auto-args
Define `call = callPackageWith { inherit pkgs lib helpers; }`, which can
be used to automatically pass the correct args into helpers files.

`helpers` is passed in recursively.
2024-07-28 22:51:24 +01:00

28 lines
733 B
Nix

{
pkgs,
lib ? pkgs.lib,
_nixvimTests ? false,
...
}:
let
# Used when importing parts of helpers
call = lib.callPackageWith { inherit pkgs lib helpers; };
# Build helpers recursively
helpers =
{
autocmd = call ./autocmd-helpers.nix { };
keymaps = call ./keymap-helpers.nix { };
lua = call ./to-lua.nix { };
toLuaObject = helpers.lua.toLua;
maintainers = import ./maintainers.nix;
neovim-plugin = call ./neovim-plugin.nix { };
nixvimTypes = call ./types.nix { };
vim-plugin = call ./vim-plugin.nix { };
}
// call ./builders.nix { }
// call ./deprecation.nix { }
// call ./options.nix { }
// call ./utils.nix { inherit _nixvimTests; };
in
helpers