Skip to content

Commit

Permalink
utility/images/image-nvim: add assertion for ueberzug backend on da…
Browse files Browse the repository at this point in the history
…rwin
  • Loading branch information
FrothyMarrow committed Feb 26, 2024
1 parent a32f13b commit 38ca1f9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ inputs: let
};

images = {
image-nvim.enable = true;
image-nvim.enable = false;
};
};

Expand Down
8 changes: 8 additions & 0 deletions modules/utility/images/image-nvim/config.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib.modules) mkIf;
Expand All @@ -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"
Expand Down

0 comments on commit 38ca1f9

Please sign in to comment.