nix-community.nixvim/tests/test-sources/plugins/by-name/clipboard-image/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
933 B
Nix
Raw Normal View History

2024-01-24 09:48:51 +01:00
{ pkgs, ... }:
{
empty = {
plugins.clipboard-image = {
enable = true;
clipboardPackage = null;
};
};
example = {
plugins.clipboard-image = {
enable = true;
clipboardPackage = pkgs.wl-clipboard;
settings = {
default = {
img_dir = "img";
img_dir_txt = "img";
img_name.__raw = "function() return os.date('%Y-%m-%d-%H-%M-%S') end";
img_handler.__raw = "function(img) end";
affix = "![]({img_path})";
};
2024-01-24 09:48:51 +01:00
markdown = {
img_dir = [
2024-01-24 09:48:51 +01:00
"src"
"assets"
"img"
];
img_dir_txt = "/assets/img";
img_handler.__raw = ''
2024-01-24 09:48:51 +01:00
function(img) -- New feature from PR #22
local script = string.format('./image_compressor.sh "%s"', img.path)
os.execute(script)
end
'';
};
};
};
};
}