mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2025-01-29 20:49:48 +01:00
lib.neovimConfiguration: deprecated extraModules and configuration
This commit is contained in:
parent
99ace503ad
commit
084846cc2c
3 changed files with 21 additions and 23 deletions
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
inputs,
|
||||
lib,
|
||||
}: let
|
||||
modulesWithInputs = import ../modules inputs;
|
||||
in
|
||||
{
|
||||
modules ? [],
|
||||
pkgs,
|
||||
check ? true,
|
||||
extraSpecialArgs ? {},
|
||||
extraModules ? [],
|
||||
...
|
||||
}:
|
||||
modulesWithInputs {
|
||||
inherit pkgs lib check extraSpecialArgs extraModules;
|
||||
configuration.imports = modules;
|
||||
}
|
|
@ -11,5 +11,5 @@
|
|||
languages = import ./languages.nix {inherit lib;};
|
||||
lists = import ./lists.nix {inherit lib;};
|
||||
lua = import ./lua.nix {inherit lib;};
|
||||
neovimConfiguration = import ./configuration.nix {inherit inputs lib;};
|
||||
neovimConfiguration = import ../modules {inherit inputs lib;};
|
||||
}
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
inputs: {
|
||||
configuration,
|
||||
pkgs,
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
}: {
|
||||
pkgs,
|
||||
check ? true,
|
||||
extraSpecialArgs ? {},
|
||||
modules ? [],
|
||||
# deprecated
|
||||
extraModules ? [],
|
||||
configuration ? {},
|
||||
}: let
|
||||
inherit (pkgs) vimPlugins;
|
||||
inherit (lib.strings) isString toString;
|
||||
|
@ -19,7 +23,19 @@ inputs: {
|
|||
# optionally with any additional modules passed by the user
|
||||
module = lib.evalModules {
|
||||
specialArgs = extraSpecialArgs // {modulesPath = toString ./.;};
|
||||
modules = concatLists [[configuration] nvimModules extraModules];
|
||||
modules = concatLists [
|
||||
nvimModules
|
||||
modules
|
||||
(lib.optional (configuration != {}) (lib.warn ''
|
||||
nvf: passing 'configuration' to lib.neovimConfiguration is deprecated.
|
||||
''
|
||||
configuration))
|
||||
|
||||
(lib.optionals (extraModules != []) (lib.warn ''
|
||||
nvf: passing 'extraModules' to lib.neovimConfiguration is deprecated, use 'modules' instead.
|
||||
''
|
||||
extraModules))
|
||||
];
|
||||
};
|
||||
|
||||
# alias to the internal configuration
|
||||
|
|
Loading…
Reference in a new issue