plugins/obsidian: use warning instead of assertion for nvim-cmp

This commit is contained in:
Gaetan Lepage 2024-03-04 15:40:48 +01:00 committed by Gaétan Lepage
parent 8226d825de
commit 1b12471be1

View file

@ -159,17 +159,14 @@ with lib;
}; };
extraConfig = cfg: { extraConfig = cfg: {
assertions = [ warnings = let
{ nvimCmpEnabled = isBool cfg.settings.completion.nvim_cmp && cfg.settings.completion.nvim_cmp;
assertion = let in
nvimCmpEnabled = isBool cfg.settings.completion.nvim_cmp && cfg.settings.completion.nvim_cmp; optional
in (nvimCmpEnabled && !config.plugins.cmp.enable)
nvimCmpEnabled -> config.plugins.nvim-cmp.enable; ''
message = '' Nixvim (plugins.obsidian): You have enabled `completion.nvim_cmp` but `plugins.cmp.enable` is `false`.
Nixvim (plugins.obsidian): You have enabled `completion.nvim_cmp` but `plugins.cmp.enable` is `false`. You should probably enable `nvim-cmp`.
You need to enable `nvim-cmp` to use this setting. '';
'';
}
];
}; };
} }