utility/images/image-nvim: add assertion for ueberzug backend on darwin

This commit is contained in:
Frothy 2024-02-26 07:31:30 -05:00
parent a32f13b636
commit 38ca1f98a2
2 changed files with 9 additions and 1 deletions

View file

@ -180,7 +180,7 @@ inputs: let
};
images = {
image-nvim.enable = true;
image-nvim.enable = false;
};
};

View file

@ -1,6 +1,7 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib.modules) mkIf;
@ -10,6 +11,13 @@
cfg = config.vim.utility.images.image-nvim;
in {
config = mkIf cfg.enable {
assertions = [
{
assertion = pkgs.stdenv.isDarwin && cfg.setupOpts.backend != "ueberzug";
message = "image-nvim: ueberzug backend is broken on ${pkgs.stdenv.hostPlatform.system}. if you are using kitty, please set `vim.utility.images.image-nvim.setupOpts.backend` option to `kitty` in your configuration, otherwise disable this module.";
}
];
vim = {
startPlugins = [
"image-nvim"