utility/img-clip: init

This commit is contained in:
haskex 2025-05-16 11:44:02 -03:00
commit 32b9694840
4 changed files with 41 additions and 1 deletions

View file

@ -14,7 +14,7 @@ in {
startPlugins = ["hardtime-nvim"]; startPlugins = ["hardtime-nvim"];
pluginRC.hardtime = entryAnywhere '' pluginRC.hardtime = entryAnywhere ''
require("hardtime").setup (${toLuaObject cfg.setupOpts}) require("hardtime").setup(${toLuaObject cfg.setupOpts})
''; '';
}; };
}; };

View file

@ -0,0 +1,23 @@
{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.nvim.dag) entryAnywhere;
inherit (lib.nvim.lua) toLuaObject;
cfg = config.vim.utility.images.img-clip;
in {
config = mkIf cfg.enable {
vim = {
startPlugins = [
"img-clip"
];
pluginRC.image-nvim = entryAnywhere ''
require("img-clip").setup(${toLuaObject cfg.setupOpts})
'';
};
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./config.nix
./img-clip.nix
];
}

View file

@ -0,0 +1,11 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkPluginSetupOption;
in {
options.vim.utility.images.img-clip = {
enable = mkEnableOption "img-clip to paste images into any markup language";
setupOpts = mkPluginSetupOption "img-clip" {};
};
}