modules/lazyload: fix provider warning formatting
First item indentation was off, update warning test to cover case.
This commit is contained in:
parent
3a831afd07
commit
494348a800
2 changed files with 32 additions and 12 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue