plugins/neotest: simplify implementation

This commit is contained in:
Gaetan Lepage 2024-03-19 10:11:49 +01:00 committed by Gaétan Lepage
parent 57d1062c04
commit 4708aac141
2 changed files with 12 additions and 40 deletions

View file

@ -33,11 +33,13 @@ with lib; let
You might want to set `plugins.treesitter.enable = true` and ensure that the `${props.treesitter-parser}` parser is enabled.
'';
plugins.neotest.enabledAdapters = [
{
inherit name;
inherit (cfg) settings;
}
plugins.neotest.settings.adapters = let
settingsString =
optionalString
(cfg.settings != {})
"(${helpers.toLuaObject cfg.settings})";
in [
"require('neotest-${name}')${settingsString}"
];
};
};