1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-25 19:51:06 +01:00

tests/fetch-tests: only apply required args

Using `functionArgs` and `intersectAttrs`, apply only the required args
to test module files.
This commit is contained in:
Matt Sturgeon 2025-11-24 08:18:30 +00:00
parent 12fd9ee1c8
commit 824e048096
67 changed files with 71 additions and 77 deletions

View file

@ -15,7 +15,11 @@ let
cases = cases =
if builtins.isFunction fnOrAttrs then if builtins.isFunction fnOrAttrs then
# Call the function # Call the function
fnOrAttrs { inherit pkgs lib; } fnOrAttrs (
builtins.intersectAttrs (builtins.functionArgs fnOrAttrs) {
inherit pkgs lib;
}
)
else else
fnOrAttrs; fnOrAttrs;
}; };

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
colorschemes.gruvbox-material-nvim.enable = true; colorschemes.gruvbox-material-nvim.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
colorschemes.solarized-osaka.enable = true; colorschemes.solarized-osaka.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
colorscheme = "vague"; colorscheme = "vague";

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs }:
{ {
"40" = { "40" = {
plugins = { plugins = {

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs }:
{ {
plain = { }; plain = { };

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs }:
{ {
example-with-str = { example-with-str = {
clipboard = { clipboard = {

View file

@ -1,8 +1,4 @@
{ { lib, pkgs }:
lib,
pkgs,
...
}:
let let
inherit (pkgs.stdenv) hostPlatform; inherit (pkgs.stdenv) hostPlatform;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
example = { example = {
keymaps = [ keymaps = [

View file

@ -1,4 +1,4 @@
{ lib, pkgs, ... }: { lib, pkgs }:
let let
pluginStubs = pkgs.callPackage ../../../utils/plugin-stubs.nix { }; pluginStubs = pkgs.callPackage ../../../utils/plugin-stubs.nix { };

View file

@ -1,4 +1,4 @@
{ lib, pkgs, ... }: { lib, pkgs }:
let let
pluginStubs = pkgs.callPackage ../../../utils/plugin-stubs.nix { }; pluginStubs = pkgs.callPackage ../../../utils/plugin-stubs.nix { };

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.actions-preview.enable = true; plugins.actions-preview.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
theme = { theme = {
plugins.alpha = { plugins.alpha = {

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.blink-indent.enable = true; plugins.blink-indent.enable = true;

View file

@ -1,4 +1,4 @@
{ pkgs, lib, ... }: { pkgs, lib }:
let let
inherit (pkgs.stdenv) hostPlatform; inherit (pkgs.stdenv) hostPlatform;
in in

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.comfy-line-numbers.enable = true; plugins.comfy-line-numbers.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, pkgs, ... }: { lib, pkgs }:
{ {
empty = { empty = {
plugins.conform-nvim.enable = true; plugins.conform-nvim.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.coverage.enable = true; plugins.coverage.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.cybu = { plugins.cybu = {

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.dbee.enable = true; plugins.dbee.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.fff.enable = true; plugins.fff.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.flash.enable = true; plugins.flash.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, pkgs, ... }: { lib, pkgs }:
{ {
empty = { empty = {
plugins.gitgutter.enable = true; plugins.gitgutter.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.gitlinker.enable = true; plugins.gitlinker.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.gitportal.enable = true; plugins.gitportal.enable = true;

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs }:
# TODO: remove once https://github.com/NixOS/nixpkgs/pull/418842 hits flake.lock # TODO: remove once https://github.com/NixOS/nixpkgs/pull/418842 hits flake.lock
pkgs.lib.optionalAttrs false { pkgs.lib.optionalAttrs false {
empty = { empty = {

View file

@ -1,4 +1,4 @@
{ lib, pkgs, ... }: { lib, pkgs }:
{ {
example = { example = {
plugins.jdtls = { plugins.jdtls = {

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.langmapper.enable = true; plugins.langmapper.enable = true;

View file

@ -1,7 +1,4 @@
{ { lib }:
lib,
...
}:
{ {
empty = { empty = {
plugins.leap.enable = true; plugins.leap.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.leetcode.enable = true; plugins.leetcode.enable = true;

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs }:
{ {
empty = { empty = {
plugins.lualine.enable = true; plugins.lualine.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.luau-lsp.enable = true; plugins.luau-lsp.enable = true;

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs }:
{ {
empty = { empty = {
# NOTE: 2024-10-10 when marked as linux specific platform # NOTE: 2024-10-10 when marked as linux specific platform

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.mini-bracketed.enable = true; plugins.mini-bracketed.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.mini-clue.enable = true; plugins.mini-clue.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.mini-comment.enable = true; plugins.mini-comment.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.mini-completion.enable = true; plugins.mini-completion.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.mini-diff.enable = true; plugins.mini-diff.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.mini-files.enable = true; plugins.mini-files.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.mini-hipatterns.enable = true; plugins.mini-hipatterns.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.mini-indentscope.enable = true; plugins.mini-indentscope.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.mini-jump2d.enable = true; plugins.mini-jump2d.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.mini-map.enable = true; plugins.mini-map.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.mini-notify.enable = true; plugins.mini-notify.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.mini-operators.enable = true; plugins.mini-operators.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.mini-pick.enable = true; plugins.mini-pick.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.mini-sessions.enable = true; plugins.mini-sessions.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.mini-snippets.enable = true; plugins.mini-snippets.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.mini-splitjoin.enable = true; plugins.mini-splitjoin.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.mini-starter.enable = true; plugins.mini-starter.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.mini-test.enable = true; plugins.mini-test.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.mini-visits.enable = true; plugins.mini-visits.enable = true;

View file

@ -1,7 +1,4 @@
{ { lib }:
lib,
...
}:
{ {
empty = { empty = {
plugins.multicursors.enable = true; plugins.multicursors.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.web-devicons.enable = true; plugins.web-devicons.enable = true;

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs }:
{ {
empty = { empty = {
plugins.neogit.enable = true; plugins.neogit.enable = true;

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs }:
# Fails on darwin with: # Fails on darwin with:
# E5113: Error while calling lua chunk: ...ckages/start/netman.nvim/lua/netman/tools/utils/init.lua:52: Unable to open netman utils cache # E5113: Error while calling lua chunk: ...ckages/start/netman.nvim/lua/netman/tools/utils/init.lua:52: Unable to open netman utils cache
pkgs.lib.optionalAttrs (!pkgs.stdenv.isDarwin) { pkgs.lib.optionalAttrs (!pkgs.stdenv.isDarwin) {

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.showkeys.enable = true; plugins.showkeys.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.copilot-lua.enable = true; plugins.copilot-lua.enable = true;

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs }:
{ {
empty = { empty = {
plugins.telescope = { plugins.telescope = {

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.tiny-inline-diagnostic.enable = true; plugins.tiny-inline-diagnostic.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.todo-comments.enable = true; plugins.todo-comments.enable = true;

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs }:
{ {
default = { default = {
plugins.treesitter = { plugins.treesitter = {

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.venv-selector.enable = true; plugins.venv-selector.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.wilder.enable = true; plugins.wilder.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.wtf.enable = true; plugins.wtf.enable = true;

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib }:
{ {
empty = { empty = {
plugins.lsp.enable = true; plugins.lsp.enable = true;

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs }:
{ {
# Empty configuration # Empty configuration
empty = { empty = {