neovim-flake/modules/utility/images/image-nvim/config.nix

31 lines
497 B
Nix
Raw Normal View History

2024-02-17 01:19:38 +01:00
{
config,
lib,
pkgs,
2024-02-17 01:19:38 +01:00
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.nvim.dag) entryAnywhere;
inherit (lib.nvim.lua) toLuaObject;
2024-02-17 01:19:38 +01:00
cfg = config.vim.utility.images.image-nvim;
in {
config = mkIf cfg.enable {
vim = {
startPlugins = [
"image-nvim"
];
luaPackages = [
"magick"
];
2024-02-17 01:19:38 +01:00
luaConfigRC.image-nvim = entryAnywhere ''
2024-02-17 01:19:38 +01:00
require("image").setup(
${toLuaObject cfg.setupOpts}
2024-02-17 01:19:38 +01:00
)
'';
};
};
}