mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-10 01:04:34 +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
|
@ -189,12 +189,12 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
};
|
||||
|
||||
extraConfig = cfg: {
|
||||
warnings =
|
||||
optional
|
||||
((isBool cfg.settings.check_ts) && cfg.settings.check_ts && !config.plugins.treesitter.enable)
|
||||
''
|
||||
Nixvim (plugins.nvim-autopairs): You have set `settings.check_ts` to `true` but have not enabled the treesitter plugin.
|
||||
We suggest you to set `plugins.treesitter.enable` to `true`.
|
||||
'';
|
||||
warnings = lib.nixvim.mkWarnings "plugins.nvim-autopairs" {
|
||||
when = (isBool cfg.settings.check_ts) && cfg.settings.check_ts && !config.plugins.treesitter.enable;
|
||||
message = ''
|
||||
You have set `settings.check_ts` to `true` but have not enabled the treesitter plugin.
|
||||
We suggest you to set `plugins.treesitter.enable` to `true`.
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue