utility/images: add image.nvim

This commit is contained in:
raf 2024-02-17 03:19:38 +03:00
commit 7cb428520b
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
10 changed files with 194 additions and 3 deletions

View file

@ -0,0 +1,27 @@
{
config,
pkgs,
lib,
...
}: let
inherit (lib) nvim mkIf attrValues;
cfg = config.vim.utility.images.image-nvim;
in {
config = mkIf cfg.enable {
vim = {
startPlugins =
[
"image-nvim"
# TODO: needs luarockss here somehow
]
++ (attrValues {inherit (pkgs) luarocks imagemagick;});
luaConfigRC.image-nvim = nvim.dag.entryAnywhere ''
require("image").setup(
${nvim.lua.toLuaObject cfg.setupOpts}
)
'';
};
};
}