nvf/modules/plugins/utility/images/image-nvim/config.nix

31 lines
497 B
Nix
Raw Permalink Normal View History

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