treewide: use mkWarnings where possible

This commit is contained in:
Gaetan Lepage 2025-01-29 14:16:00 +01:00
parent abba4af10b
commit 12e658eca8
34 changed files with 309 additions and 225 deletions

View file

@ -100,14 +100,15 @@ lib.nixvim.plugins.mkNeovimPlugin {
};
extraConfig = cfg: {
warnings =
lib.optional
(config.plugins.treesitter.enable -> config.plugins.treesitter.settings.highlight.enable == null)
warnings = lib.nixvim.mkWarnings "plugins.otter" {
when =
config.plugins.treesitter.enable -> config.plugins.treesitter.settings.highlight.enable == null;
''
NixVim(plugins.otter): you have enabled otter, but treesitter syntax highlighting is not enabled.
Otter functionality might not work as expected without it. Make sure `plugins.treesitter.settings.highlight.enable` and `plugins.treesitter.enable` are enabled.
'';
message = ''
You have enabled otter, but treesitter syntax highlighting is not enabled.
Otter functionality might not work as expected without it. Make sure `plugins.treesitter.settings.highlight.enable` and `plugins.treesitter.enable` are enabled.
'';
};
plugins.lsp.onAttach = lib.mkIf cfg.autoActivate ''
require('otter').activate()