Simplify by reducing the number of transformations done to the
test-files' test-case modules attr.
Since `pkgs.linkFarm` can accept _either_ a list or an attrset, we don't
need to transform the attrset into a list.
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`
Which-key implemented proper icon support, utilize the icon attribute to
properly override/set icons so that alignment doesn't get thrown off and
it's inherited with child mappings.
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.
Since cbd1003d9d I'm able to add _some_
invalid config definitions to modules the tests are using and get no
build error.
For example `extraConfigLua = null;` should produce an invalid type
error, but doesn't.
One less visible change in that commit is the move away from using the
"standalone" wrapper (`makeNixvimWithModule`), which implicitly sets
`wrapRc = true`.
Adding back `wrapRc` to the tests seems to fix the issue, however this
makes me wonder if there's an underlying issue with wrapping/not-wrapping?
Perhaps we've simply uncovered a long-standing eval issue that is masked
over by using `wrapRc`?
Rustaceanvim will throw an error if the configuration is sourced after
initialization. Our globals are defined at the top of the init.lua so
moving the settings to leverage the globals option and setting a
callback function as default to ensure we dont need to worry about
something initializing it before lspOnAttach is available.
Allows plugins to utilize the global nixvim table to access the lsp on
attach function and prevent needing to filter attribute set or manage
the property explicitly in lua.
Using mkOrder to ensure the options can be accessible to everything
throughout the config. Setting right below global table available, so
variables can reference stuff inside global table.
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.
Long descriptions for plugins will shove the plugin's source link and
maintainer information far down the page. Since those are fairly short
and the description is a variable size. Moving below to maintain
consistent placement.
Warnings and assertions defined as `config.warnings` and `config.assertions`
respectively will be checked as part of the test derivation, instead of
when evaluating the modules.
Adds new `checkWarnings` and `checkAssertions` test options (default true).
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')";
}