This should help to maintain uniformity and hopefully make contributions
easier.
Kept regression tests local to the derivation, however these are also
added to the flake checks.
Based of the README for now, with a small additional "welcome to the
docs" section.
Perhaps in future, we could re-use the README.md verbatim? Perhaps with
some additional post-processing.
I think we'd want to dramatically reduce its size first though.
By having a dedicated homepage outside of `user-guide`, this fixes#1625
Since starting to use `lib.mkPackageOption` throughout nixvim, users
will see a slightly different error message when encountering mismatched
nixpkgs channel errors.
Also fleshed out some recommendations.
Instead of maintainers providing an actual `defaultPackage`, they should
specify the pkg name which we'll use when calling `lib.mkPackageOption`.
This makes `mkVimPlugin` and `mkNeovimPlugin` compliant with #1950.
Make our "extended" lib available to host modules as `_module.args.nixvimLib`.
We didn't do this before because `helpers` was too generic of a name,
but `nixvimLib` should be ok.
{ nixvimLib, ... }: {
programs.nixvim.someOption = nixvimLib.nixvim.mkRaw "print('Hi')";
}
NixOS, HM, & Darwin provide a `lib` option, not to be confused with the
`lib` module arg.
This option is intended for modules to define custom functions without
having to extend nixpkgs lib.
The old option is renamed, if it is accessed it will print:
trace: Obsolete option `nixvim.helpers' is used. It was renamed to `lib.nixvim'.
Rather than nesting it as `config`, pass `makeNixvim`'s argument through
directly as a module.
This not only simplifies the implementation, but allows users to use
`makeNixvim` for any scenario where `makeNixvimWithModule` would normally
be required.