mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-03 13:54:29 +02:00
plugins/neotest: add assertion to ensure that neotest is enabled if an adapter is
This commit is contained in:
parent
55a45b6713
commit
7cc1685eaf
1 changed files with 7 additions and 0 deletions
|
@ -32,6 +32,13 @@ let
|
||||||
mkIf cfg.enable {
|
mkIf cfg.enable {
|
||||||
extraPlugins = [ cfg.package ];
|
extraPlugins = [ cfg.package ];
|
||||||
|
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = config.plugins.neotest.enable;
|
||||||
|
message = "Nixvim: you have enabled `plugins.neotest.adapters.${name}` but `plugins.neotest.enable` is `false`.";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
warnings = optional (!config.plugins.treesitter.enable) ''
|
warnings = optional (!config.plugins.treesitter.enable) ''
|
||||||
Nixvim (plugins.neotest.adapters.${name}): This adapter requires `treesitter` to be enabled.
|
Nixvim (plugins.neotest.adapters.${name}): This adapter requires `treesitter` to be enabled.
|
||||||
You might want to set `plugins.treesitter.enable = true` and ensure that the `${props.treesitter-parser}` parser is enabled.
|
You might want to set `plugins.treesitter.enable = true` and ensure that the `${props.treesitter-parser}` parser is enabled.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue