From 43c6f7293eba3fa5ff699e339e55270305e51cab Mon Sep 17 00:00:00 2001 From: saygo-png Date: Thu, 11 Sep 2025 03:15:01 +0200 Subject: [PATCH] plugins/colorschemes: add warning to gruvbox-material Signed-off-by: saygo-png --- plugins/colorschemes/gruvbox-material.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/plugins/colorschemes/gruvbox-material.nix b/plugins/colorschemes/gruvbox-material.nix index b304c36c..847c69f6 100644 --- a/plugins/colorschemes/gruvbox-material.nix +++ b/plugins/colorschemes/gruvbox-material.nix @@ -1,4 +1,4 @@ -{ lib, ... }: +{ lib, config, ... }: lib.nixvim.plugins.mkVimPlugin { name = "gruvbox-material"; isColorscheme = true; @@ -19,4 +19,15 @@ lib.nixvim.plugins.mkVimPlugin { }; show_eob = 0; }; + + extraConfig = cfg: { + warnings = lib.nixvim.mkWarnings "colorschemes.gruvbox-material" { + when = (cfg.settings.better_performance or 0 == 1) && !config.impureRtp; + message = '' + You have enabled 'better_performance', but the top-level option 'impureRtp' is false. + The performance option generates syntax files at runtime that cannot be accessed with impureRtp disabled. + This breaks the plugin. Either disable 'better_performance' or enable 'impureRtp'. + ''; + }; + }; }