treewide: use mkWarnings wherever possible

This commit is contained in:
Gaetan Lepage 2025-01-17 16:18:38 +01:00
parent 2ec6218f87
commit 60adb6c56b
17 changed files with 158 additions and 122 deletions

View file

@ -84,11 +84,14 @@ lib.nixvim.plugins.mkVimPlugin {
};
extraConfig = cfg: {
warnings = lib.optional (cfg.treesitter.enable && (!config.plugins.treesitter.enable)) ''
Nixvim (plugins.vim-matchup): `plugins.vim-matchup.treesitter.enable` is `true`, but the
treesitter plugin itself is not.
-> Set `plugins.treesitter.enable` to `true`.
'';
warnings = lib.nixvim.mkWarnings "plugins.vim-matchup" {
when = cfg.treesitter.enable && (!config.plugins.treesitter.enable);
message = ''
`plugins.vim-matchup.treesitter.enable` is `true`, but the treesitter plugin itself is not.
-> Set `plugins.treesitter.enable` to `true`.
'';
};
plugins.treesitter.settings.matchup = cfg.treesitter;
};