summaryrefslogtreecommitdiffstats
path: root/modules/plugins/utility/yanky-nvim/yanky-nvim.nix
blob: 72f55d93d618161fa345fbc4a66d4c8873a143ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{lib, ...}: let
  inherit (lib.options) mkOption mkEnableOption;
  inherit (lib.types) enum;
  inherit (lib.nvim.types) mkPluginSetupOption;
in {
  options.vim.utility.yanky-nvim = {
    enable = mkEnableOption ''
      improved Yank and Put functionalities for Neovim  [yanky-nvim]
    '';

    setupOpts = mkPluginSetupOption "yanky-nvim" {
      ring.storage = mkOption {
        type = enum ["shada" "sqlite" "memory"];
        default = "shada";
        example = "sqlite";
        description = ''
          storage mode for ring values.

          - **shada**: this will save pesistantly using Neovim ShaDa feature.
            This means that history will be persisted between each session of Neovim.
          - **memory**: each Neovim instance will have his own history and it will be
            lost between sessions.
          - **sqlite**: more reliable than `shada`, requires `sqlite.lua` as a dependency.
            nvf will add this dependency to `PATH` automatically.
        '';
      };
    };
  };
}