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

30 lines
489 B
Nix
Raw 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
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
)
'';
};
};
}