mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-10 04:37:16 +00:00
utility/images: add image.nvim
This commit is contained in:
parent
024e1a6845
commit
7cb428520b
10 changed files with 194 additions and 3 deletions
27
modules/utility/images/image-nvim/config.nix
Normal file
27
modules/utility/images/image-nvim/config.nix
Normal 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}
|
||||
)
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue