mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
treewide: use mkWarnings wherever possible
This commit is contained in:
parent
02e16b2a76
commit
2ec6218f87
7 changed files with 72 additions and 59 deletions
|
@ -249,13 +249,16 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
};
|
||||
|
||||
extraConfig = cfg: {
|
||||
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`.
|
||||
warnings = lib.nixvim.mkWarnings "plugins.obsidian" {
|
||||
when =
|
||||
let
|
||||
nvimCmpEnabled = isBool cfg.settings.completion.nvim_cmp && cfg.settings.completion.nvim_cmp;
|
||||
in
|
||||
nvimCmpEnabled && (!config.plugins.cmp.enable);
|
||||
message = ''
|
||||
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