mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-02 11:31:15 +00:00
28 lines
518 B
Nix
28 lines
518 B
Nix
{
|
|
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}
|
|
)
|
|
'';
|
|
};
|
|
};
|
|
}
|