utility/yanky-nvim: fix plugin setupOpts; assert when shada is disabled

This commit is contained in:
raf 2025-02-24 16:56:15 +03:00
commit 831a5db8fa
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
2 changed files with 17 additions and 5 deletions

View file

@ -1,13 +1,14 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption mkOption;
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 = {
setupOpts = mkPluginSetupOption "yanky-nvim" {
ring.storage = mkOption {
type = enum ["shada" "sqlite" "memory"];
default = "shada";
@ -15,11 +16,11 @@ in {
description = ''
storage mode for ring values.
- shada: this will save pesistantly using Neovim ShaDa feature.
- **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
- **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.
- **sqlite**: more reliable than `shada`, requires `sqlite.lua` as a dependency.
nvf will add this dependency to `PATH` automatically.
'';
};