treewide: use boolean comparison to simplify the code base

This commit is contained in:
Gaetan Lepage 2025-01-29 17:42:54 +01:00
parent 5066c71549
commit e908e344f4
18 changed files with 29 additions and 64 deletions

View file

@ -48,18 +48,17 @@ lib.nixvim.plugins.mkNeovimPlugin {
warnings =
let
copilot-lua-cfg = config.plugins.copilot-lua.settings;
isEnabled = b: builtins.isBool b && b;
in
lib.nixvim.mkWarnings "plugins.blink-cmp-copilot" [
{
when = isEnabled copilot-lua-cfg.suggestion.enabled;
when = copilot-lua-cfg.suggestion.enabled == true;
message = ''
It is recommended to disable copilot's `suggestion` module, as it can interfere with
completions properly appearing in blink-cmp-copilot.
'';
}
{
when = isEnabled copilot-lua-cfg.panel.enabled;
when = copilot-lua-cfg.panel.enabled == true;
message = ''
It is recommended to disable copilot's `panel` module, as it can interfere with completions
properly appearing in blink-cmp-copilot.