Rename the overlay arguments from the conventional `final: prev:` to the
more explicit `lib: prevLib:`, reflecting that this overlay operates
only on the Nixpkgs lib, rather than a full package set.
Add a doccomment explaining how the overlay is intended to be applied
(via `lib.extend`) and what each argument represents.
Improved inline comments in the overlay.
Rename `lib/default.nix` to `lib/top-level.nix` to make its purpose
explicit and discourage importing it directly. Consumers should obtain
the extended lib via flake outputs or the overlay, rather than bypassing
the required bootstrapping logic.
This clarifies the file's role and avoids suggesting it is the primary
entrypoint to Nixvim's lib subsection.
Simplify the `enableExceptInTests` attribute, removing the
`_nixvimTests` argument.
We now do a full re-eval of the nixvim configuration before building the
test, giving us a central place to implement `enableExceptInTests` and
its eventual replacement(s).
This extends support for `enableExceptInTests` to all methods of getting
a nixvim test derivation. Previously, it only worked when using `mkTestDerivationFromNixvimModule`.
In `tests/main.nix`, we avoid the re-eval by doing the initial eval with
a "test mode" lib from the start.
This asserts that we don't accidentally end up with conflicting
definitions.
Such conflicts must be made explicit, e.g. using `mkForce` or `mkDefault`.
`defaultNullOpts` is generally used for representing lua-options.
We should probably a) rename it something like `luaOptions` and switch
out the primitive types to use the new `lua-types`.
Moved all function-specific docs from `docs/lib/index.md` into RFC145
doc-comments.
Added `lib.nixvim.lua.toLuaObject` to hold the public docs and serve as
a stable impl of `toLua'` in case we decide to change its defaults.
`lib.generators.toPretty` has bespoke handling for rendering nix strings
using either the `" "` or `'' ''` syntax, based on some heuristics.
Using `toPretty` instead of `toJSON` improves how literal-lua examples
render in the docs.
Allows most existing configs to continue building, now with warnings
instead of assertions when the old `plugins.*.*Package` options are
used.
An assertion will still occur if there is a merge conflict, e.g:
`plugins.a.fooPackage = null` and `plugins.b.fooPackage = pkgs.foo`.