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
{
assertion = let
nvimCmpEnabled = isBool cfg.settings.completion.nvim_cmp && cfg.settings.completion.nvim_cmp; nvimCmpEnabled = isBool cfg.settings.completion.nvim_cmp && cfg.settings.completion.nvim_cmp;
in in
nvimCmpEnabled -> config.plugins.nvim-cmp.enable; optional
message = '' (nvimCmpEnabled && !config.plugins.cmp.enable)
''
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 need to enable `nvim-cmp` to use this setting. You should probably enable `nvim-cmp`.
''; '';
}
];
}; };
} }