diff --git a/plugins/by-name/yanky/default.nix b/plugins/by-name/yanky/default.nix index b9c69c6f..0bef4f7a 100644 --- a/plugins/by-name/yanky/default.nix +++ b/plugins/by-name/yanky/default.nix @@ -1,8 +1,8 @@ { lib, - helpers, config, - pkgs, + helpers, + options, ... }: with lib; @@ -347,6 +347,16 @@ helpers.neovim-plugin.mkNeovimPlugin { callSetup = false; extraConfig = cfg: { + # TODO: Added 2024-09-14 remove after 24.11 + plugins.sqlite-lua.enable = mkOverride 1490 true; + warnings = + optional + (cfg.settings.ring.storage == "sqlite" && options.plugins.sqlite-lua.enable.highestPrio == 1490) + '' + Nixvim (plugins.yanky) `sqlite-lua` automatic installation is deprecated. + Please use `plugins.sqlite-lua.enable`. + ''; + assertions = [ { assertion = cfg.enableTelescope -> config.plugins.telescope.enable; @@ -354,6 +364,13 @@ helpers.neovim-plugin.mkNeovimPlugin { Nixvim (plugins.yanky): The telescope integration needs telescope to function as intended ''; } + { + assertion = cfg.settings.ring.storage == "sqlite" -> config.plugins.sqlite-lua.enable; + message = '' + Nixvim (plugins.yanky): The sqlite storage backend needs `sqlite-lua` to function as intended. + You can enable it by setting `plugins.sqlite-lua.enable` to `true`. + ''; + } ]; extraConfigLua = '' @@ -365,8 +382,6 @@ helpers.neovim-plugin.mkNeovimPlugin { end ''; - extraPlugins = mkIf (cfg.settings.ring.storage == "sqlite") [ pkgs.vimPlugins.sqlite-lua ]; - plugins.telescope.enabledExtensions = mkIf cfg.enableTelescope [ "yank_history" ]; }; } diff --git a/tests/test-sources/plugins/by-name/yanky/default.nix b/tests/test-sources/plugins/by-name/yanky/default.nix index 32d4631a..687a8f5f 100644 --- a/tests/test-sources/plugins/by-name/yanky/default.nix +++ b/tests/test-sources/plugins/by-name/yanky/default.nix @@ -63,6 +63,7 @@ test.runNvim = false; plugins = { + sqlite-lua.enable = true; telescope.enable = true; yanky = {