mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-20 10:45:51 +02:00
Some checks are pending
Publish every Git push to main to FlakeHub / flakehub-publish (push) Waiting to run
Publish every git push to Flakestry / publish-flake (push) Waiting to run
Documentation / Version info (push) Waiting to run
Documentation / Build (push) Blocked by required conditions
Documentation / Combine builds (push) Blocked by required conditions
Documentation / Deploy (push) Blocked by required conditions
46 lines
1.1 KiB
Nix
46 lines
1.1 KiB
Nix
{ pkgs, lib, ... }:
|
|
let
|
|
inherit (pkgs.stdenv) hostPlatform;
|
|
in
|
|
{
|
|
empty = {
|
|
plugins.clipboard-image = {
|
|
enable = true;
|
|
clipboardPackage = null;
|
|
};
|
|
};
|
|
|
|
example = {
|
|
plugins.clipboard-image = {
|
|
enable = true;
|
|
|
|
clipboardPackage = lib.mkMerge [
|
|
(lib.mkIf hostPlatform.isLinux pkgs.wl-clipboard)
|
|
(lib.mkIf hostPlatform.isDarwin pkgs.pngpaste)
|
|
];
|
|
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 = "";
|
|
};
|
|
markdown = {
|
|
img_dir = [
|
|
"src"
|
|
"assets"
|
|
"img"
|
|
];
|
|
img_dir_txt = "/assets/img";
|
|
img_handler.__raw = ''
|
|
function(img) -- New feature from PR #22
|
|
local script = string.format('./image_compressor.sh "%s"', img.path)
|
|
os.execute(script)
|
|
end
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|