modules/lazyload: fix provider warning formatting

First item indentation was off, update warning test to cover case.
This commit is contained in:
Austin Horstman 2026-04-24 16:30:31 -05:00
parent 3a831afd07
commit 494348a800
2 changed files with 32 additions and 12 deletions

View file

@ -49,7 +49,7 @@ in
message = ''
You have enabled lazy loading support for the following plugins but have not enabled a lazy loading provider.
${lib.concatImapStringsSep "\n" (i: x: "${toString i}. plugins.${x}") pluginsWithLazyLoad}
${lib.concatImapStringsSep "\n" (i: x: " ${toString i}. plugins.${x}") pluginsWithLazyLoad}
Currently supported lazy providers:
- lz-n

View file

@ -182,27 +182,47 @@ in
warn-when-lazy-loading-without-provider = {
test = {
buildNixvim = false;
runNvim = false;
warnings = expect: [
(expect "count" 1)
(expect "any" "You have enabled lazy loading support")
(expect "anyExact" (
"Nixvim (lazy loading): You have enabled lazy loading support for the following plugins but have not enabled a lazy loading provider.\n"
+ " 1. plugins.codesnap\n"
+ " 2. plugins.neotest\n"
+ "\n"
+ "Currently supported lazy providers:\n"
+ " - lz-n"
))
];
};
plugins.neotest = {
enable = true;
lazyLoad = {
plugins = {
codesnap = {
enable = true;
settings = {
keys = [
{
__unkeyed-1 = "<leader>nt";
__unkeyed-3 = "<CMD>Neotest summary<CR>";
desc = "Summary toggle";
}
lazyLoad = {
enable = true;
settings.cmd = [
"CodeSnap"
"CodeSnapSave"
];
};
};
neotest = {
enable = true;
lazyLoad = {
enable = true;
settings = {
keys = [
{
__unkeyed-1 = "<leader>nt";
__unkeyed-3 = "<CMD>Neotest summary<CR>";
desc = "Summary toggle";
}
];
};
};
};
};
};