Add support for automatically importing any directories under
`plugins/by-name`.
Includes a validation test, which is run by CI and by the pre-commit hook.
The test ensures "package" options use a "literalExpression" in their
defaultText; i.e. it validates `lib.mkPackageOption` was used to build
the package options.
All options whose `default` is a derivation are covered by the test,
other than submodule sub-options.
Ensure `mkTestDerivationFromNixvimModule` correctly test warnings & assertions.
Also did some minor cleanup:
- Call `failing-tests.nix` using `pkgs.callPackage`
- Replace repetive use of `testBuildFailure` with a wrapper
`mkFailingNixvimTest`
Adds a regression test for #2076. This test ensures that
`extraConfigLua` is used in `finalPackage` and that the test will fail
correctly when running `nvim` results in unexpected output.
I have been using this more and wanted to create some filters to
onlyoutput the information I cared about. This adds the ability to
filter bykind, state, and whether a plugin has deprecation warnings.
Introduces the `test.runNvim` module option.
Deprecates the historic `dontRun` argument passed to the test-derivation
helpers.
Soft-deprecates the `tests.dontRun` attr used in tests currently.
Use a consistent behavior of getopt in launchtests.sh. Wasn't able to
use tests command on macbook without including this because the macOS
getopt didn't support our usage.
This commit adds support for byte compiling lua configuration files.
It's enabled by default (if byte compiling is enabled at all) and can be
disabled with `performance.byteCompileLua.configs` toggle.
To implement this feature `extraFiles.<name>.finalSource` internal
read-only option is introduced. `source` option cannot be used because
it's user configurable. In order to access the values of the
`performance.byteCompileLua` options, parent config is added to
specialArgs of extraFiles submodule. Then the usages of `source` option
changed to `finalSource` in all relevant places (filesPlugin and
wrappers).
Added more helpers for various cases of byte compiling:
* `byteCompileLuaFile` byte compiles lua file
* `byteCompileLuaHook` is a setup hook that byte compiles all lua files
* `byteCompileLuaDrv` overrides derivation by adding byteCompileLuaHook
to it
Added tests to validate that extraFiles specified by various methods are
handled correctly. Added a separate home-manager test, that is intended
to validate that extraFiles propagated to wrapper modules are correctly
byte compiled.
This moves most assertions out of generate-files and into a check
derivation. This should allow the CI to finish, even when there are
issues.
This also properly tests efmls, which was only checked partially before.
rust-analyzer is not covered because the existing assertions relate more
to edge-cases not handled by the generation script than the result it
builds.
as this isn't used by consumers, they should be able to remove this
input via `inputs.nixvim.inputs.git-hooks.follows = ""`. it is
especially important here as `git-hooks` has a large amount of inputs
itself
If we access the asserts outside the derivation arguments, and inside
the code that _creates_ the derivation then we observe IFD in `nix flake
show`.
This commit fixes it, and allows `nix flake show` to work!
Fixes#1154