mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 18:31:35 +00:00
lib.neovimConfiguration: deprecated extraModules and configuration (#377)
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-html) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-json) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-manpages) (push) Has been cancelled
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-html) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-json) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-manpages) (push) Has been cancelled
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
* lib.neovimConfiguration: deprecated extraModules and configuration * docs: various fixes
This commit is contained in:
parent
99ace503ad
commit
57be605ed4
9 changed files with 257 additions and 283 deletions
|
@ -1,10 +1,13 @@
|
|||
inputs: {
|
||||
configuration,
|
||||
pkgs,
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
check ? true,
|
||||
}: {
|
||||
pkgs,
|
||||
extraSpecialArgs ? {},
|
||||
modules ? [],
|
||||
# deprecated
|
||||
extraModules ? [],
|
||||
configuration ? {},
|
||||
}: let
|
||||
inherit (pkgs) vimPlugins;
|
||||
inherit (lib.strings) isString toString;
|
||||
|
@ -13,13 +16,25 @@ inputs: {
|
|||
# import modules.nix with `check`, `pkgs` and `lib` as arguments
|
||||
# check can be disabled while calling this file is called
|
||||
# to avoid checking in all modules
|
||||
nvimModules = import ./modules.nix {inherit pkgs check lib;};
|
||||
nvimModules = import ./modules.nix {inherit pkgs lib;};
|
||||
|
||||
# evaluate the extended library with the modules
|
||||
# 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…
Add table
Add a link
Reference in a new issue