Commit graph

5 commits

Author SHA1 Message Date
traxys
62f32bfc71 treewide: Reformat with nixfmt 2024-05-05 22:00:40 +02:00
Rob Hanlon
485d21f60d
Add _nixvimTests = false to flake.lib output (#1125)
In my personal configuration, I rely on `nixvim.lib.${system}.helpers` to get access to things like `mkRaw` and `toLuaObject` for use in my extended `lib`.

With the changes made in 6d7e429537, `nixvim.lib.${system}.helpers` can no longer be accessed directly from the `nixvim` input as `_nixvimTests` is not provided as an input attribute, so loading `helpers.nix` fails.

This small change restores what I *think* is the intended behavior of this module
2024-02-21 23:40:49 +01:00
traxys
6d7e429537
tests: Introduce a way to disable options when running in tests (#1095)
In our basic template we used to provide a check based on
`mkTestDerivationFromNvim`. The issue with this check (that is handled
correctly internally) is that some plugins _can't_ be used in the test
environment, for example image.nvim like in #1085.

This commit introduces a new function to generate such checks,
`mkTestDerivationFromNixvimModule`, that wraps a nixvim configuration
instead of a built nvim instance.

Then a configuration can rely on the newly added
`helpers.enableExceptInTests` attribute to disable parts of the
configuration depending if it is evaluated in tests or in a real final
configuration.

Resolves #1085
2024-02-15 14:27:45 +01:00
Alexander Nortung
3600698aba
Added test for template and fixed check export for lib (#361) 2023-05-15 11:04:52 +02:00
Alexander Nortung
2258eb8df8
misc: added flake template (#219)
* Added simple flake template

* Added readme to template

* Updated readme to show how to use the template

* Formatting

* removed unused file from template

* Fixed template url and pkgs

* Formatting
2023-03-03 09:18:52 +00:00