mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 16:39:00 +02:00
lib/helpers: scope each subsection, but offer aliases
This commit is contained in:
parent
bc84fda2b8
commit
7c39d77b9f
1 changed files with 71 additions and 15 deletions
|
@ -9,20 +9,76 @@ let
|
||||||
call = lib.callPackageWith { inherit pkgs lib helpers; };
|
call = lib.callPackageWith { inherit pkgs lib helpers; };
|
||||||
|
|
||||||
# Build helpers recursively
|
# Build helpers recursively
|
||||||
helpers =
|
helpers = {
|
||||||
{
|
autocmd = call ./autocmd-helpers.nix { };
|
||||||
autocmd = call ./autocmd-helpers.nix { };
|
builders = call ./builders.nix { };
|
||||||
keymaps = call ./keymap-helpers.nix { };
|
deprecation = call ./deprecation.nix { };
|
||||||
lua = call ./to-lua.nix { };
|
keymaps = call ./keymap-helpers.nix { };
|
||||||
toLuaObject = helpers.lua.toLua;
|
lua = call ./to-lua.nix { };
|
||||||
maintainers = import ./maintainers.nix;
|
maintainers = import ./maintainers.nix;
|
||||||
neovim-plugin = call ./neovim-plugin.nix { };
|
neovim-plugin = call ./neovim-plugin.nix { };
|
||||||
nixvimTypes = call ./types.nix { };
|
nixvimTypes = call ./types.nix { };
|
||||||
vim-plugin = call ./vim-plugin.nix { };
|
options = call ./options.nix { };
|
||||||
}
|
utils = call ./utils.nix { inherit _nixvimTests; };
|
||||||
// call ./builders.nix { }
|
vim-plugin = call ./vim-plugin.nix { };
|
||||||
// call ./deprecation.nix { }
|
|
||||||
// call ./options.nix { }
|
# Top-level helper aliases:
|
||||||
// call ./utils.nix { inherit _nixvimTests; };
|
# 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
|
||||||
|
;
|
||||||
|
|
||||||
|
toLuaObject = helpers.lua.toLua;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
helpers
|
helpers
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue