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

30 lines
486 B
Nix
Raw Permalink Normal View History

2024-02-17 00:19:38 +00:00
{
config,
lib,
...
}: 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
pluginRC.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
)
'';
};
};
}