2024-01-31 08:51:39 +01:00
|
|
|
{
|
|
|
|
pkgs,
|
2024-07-08 05:51:51 +01:00
|
|
|
lib ? pkgs.lib,
|
|
|
|
_nixvimTests ? false,
|
2024-01-31 08:51:39 +01:00
|
|
|
...
|
2024-05-05 19:39:35 +02:00
|
|
|
}:
|
|
|
|
let
|
2024-07-28 22:51:18 +01:00
|
|
|
# Used when importing parts of helpers
|
2024-08-01 18:26:38 +01:00
|
|
|
call = lib.callPackageWith {
|
|
|
|
# TODO: deprecate/remove using `helpers` in the subsections
|
|
|
|
inherit pkgs helpers;
|
|
|
|
lib = helpers.extendedLib;
|
|
|
|
};
|
2024-07-28 22:51:18 +01:00
|
|
|
|
2024-07-28 22:30:11 +01:00
|
|
|
# Build helpers recursively
|
2024-08-01 18:05:00 +01:00
|
|
|
helpers = {
|
|
|
|
autocmd = call ./autocmd-helpers.nix { };
|
|
|
|
builders = call ./builders.nix { };
|
|
|
|
deprecation = call ./deprecation.nix { };
|
2024-08-01 18:26:38 +01:00
|
|
|
extendedLib = call ./extend-lib.nix { inherit lib; };
|
2024-08-01 18:05:00 +01:00
|
|
|
keymaps = call ./keymap-helpers.nix { };
|
|
|
|
lua = call ./to-lua.nix { };
|
2024-08-02 01:26:01 +01:00
|
|
|
modules = call ./modules.nix { };
|
2024-08-01 18:05:00 +01:00
|
|
|
neovim-plugin = call ./neovim-plugin.nix { };
|
|
|
|
nixvimTypes = call ./types.nix { };
|
|
|
|
options = call ./options.nix { };
|
|
|
|
utils = call ./utils.nix { inherit _nixvimTests; };
|
|
|
|
vim-plugin = call ./vim-plugin.nix { };
|
|
|
|
|
|
|
|
# Top-level helper aliases:
|
|
|
|
# TODO: deprecate some aliases
|
|
|
|
|
|
|
|
inherit (helpers.builders)
|
|
|
|
writeLua
|
|
|
|
writeByteCompiledLua
|
|
|
|
byteCompileLuaFile
|
|
|
|
byteCompileLuaHook
|
|
|
|
byteCompileLuaDrv
|
|
|
|
;
|
|
|
|
|
|
|
|
inherit (helpers.deprecation) getOptionRecursive mkDeprecatedSubOptionModule transitionType;
|
|
|
|
|
|
|
|
inherit (helpers.options)
|
|
|
|
defaultNullOpts
|
|
|
|
mkCompositeOption
|
|
|
|
mkCompositeOption'
|
|
|
|
mkNullOrLua
|
|
|
|
mkNullOrLua'
|
|
|
|
mkNullOrLuaFn
|
|
|
|
mkNullOrLuaFn'
|
|
|
|
mkNullOrOption
|
|
|
|
mkNullOrOption'
|
|
|
|
mkNullOrStr
|
|
|
|
mkNullOrStr'
|
|
|
|
mkNullOrStrLuaFnOr
|
|
|
|
mkNullOrStrLuaFnOr'
|
|
|
|
mkNullOrStrLuaOr
|
|
|
|
mkNullOrStrLuaOr'
|
|
|
|
mkPackageOption
|
|
|
|
mkPluginPackageOption
|
|
|
|
mkSettingsOption
|
|
|
|
pluginDefaultText
|
|
|
|
;
|
|
|
|
|
|
|
|
inherit (helpers.utils)
|
|
|
|
concatNonEmptyLines
|
|
|
|
emptyTable
|
|
|
|
enableExceptInTests
|
|
|
|
hasContent
|
|
|
|
ifNonNull'
|
|
|
|
listToUnkeyedAttrs
|
|
|
|
mkIfNonNull
|
|
|
|
mkIfNonNull'
|
|
|
|
mkRaw
|
|
|
|
mkRawKey
|
|
|
|
override
|
|
|
|
overrideDerivation
|
|
|
|
toRawKeys
|
|
|
|
toSnakeCase
|
|
|
|
upperFirstChar
|
|
|
|
wrapDo
|
|
|
|
wrapLuaForVimscript
|
|
|
|
wrapVimscriptForLua
|
|
|
|
;
|
|
|
|
|
2024-08-01 18:26:38 +01:00
|
|
|
# TODO: Deprecate this `maintainers` alias
|
|
|
|
inherit (helpers.extendedLib) maintainers;
|
|
|
|
|
2024-08-01 18:05:00 +01:00
|
|
|
toLuaObject = helpers.lua.toLua;
|
|
|
|
};
|
2024-01-25 15:43:06 +01:00
|
|
|
in
|
2024-07-28 22:30:11 +01:00
|
|
|
helpers
|