mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 09:48:42 +02:00
plugins/obsidian: use warning instead of assertion for nvim-cmp
This commit is contained in:
parent
8226d825de
commit
1b12471be1
1 changed files with 9 additions and 12 deletions
|
@ -159,17 +159,14 @@ with lib;
|
|||
};
|
||||
|
||||
extraConfig = cfg: {
|
||||
assertions = [
|
||||
{
|
||||
assertion = let
|
||||
nvimCmpEnabled = isBool cfg.settings.completion.nvim_cmp && cfg.settings.completion.nvim_cmp;
|
||||
in
|
||||
nvimCmpEnabled -> config.plugins.nvim-cmp.enable;
|
||||
message = ''
|
||||
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.
|
||||
'';
|
||||
}
|
||||
];
|
||||
warnings = let
|
||||
nvimCmpEnabled = isBool cfg.settings.completion.nvim_cmp && cfg.settings.completion.nvim_cmp;
|
||||
in
|
||||
optional
|
||||
(nvimCmpEnabled && !config.plugins.cmp.enable)
|
||||
''
|
||||
Nixvim (plugins.obsidian): You have enabled `completion.nvim_cmp` but `plugins.cmp.enable` is `false`.
|
||||
You should probably enable `nvim-cmp`.
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue