diff --git a/plugins/by-name/neoclip/default.nix b/plugins/by-name/neoclip/default.nix index d670905d..25c897b5 100644 --- a/plugins/by-name/neoclip/default.nix +++ b/plugins/by-name/neoclip/default.nix @@ -1,7 +1,8 @@ { lib, + config, helpers, - pkgs, + options, ... }: with lib; @@ -235,8 +236,30 @@ helpers.neovim-plugin.mkNeovimPlugin { }; extraConfig = cfg: { - extraPlugins = mkIf ( - isBool cfg.settings.enable_persistent_history && cfg.settings.enable_persistent_history - ) [ pkgs.vimPlugins.sqlite-lua ]; + # TODO: added 2024-09-14 remove after 24.11 + plugins.sqlite-lua.enable = mkOverride 1490 true; + warnings = + optional + ( + isBool cfg.settings.enable_persistent_history + && cfg.settings.enable_persistent_history + && options.plugins.sqlite-lua.enable.highestPrio == 1490 + ) + '' + Nixvim (plugins.neoclip) `sqlite-lua` automatic installation is deprecated. + Please use `plugins.sqlite-lua.enable`. + ''; + + assertions = [ + { + assertion = + isBool cfg.settings.enable_persistent_history && cfg.settings.enable_persistent_history + -> config.plugins.sqlite-lua.enable; + message = '' + Nixvim (plugins.neoclip): The persistent history sqlite storage backend needs `sqlite-lua` to function as intended. + You can enable it by setting `plugins.sqlite-lua.enable` to `true`. + ''; + } + ]; }; } diff --git a/tests/test-sources/plugins/by-name/neoclip/default.nix b/tests/test-sources/plugins/by-name/neoclip/default.nix index 40e8886f..da1e02ce 100644 --- a/tests/test-sources/plugins/by-name/neoclip/default.nix +++ b/tests/test-sources/plugins/by-name/neoclip/default.nix @@ -8,11 +8,13 @@ # re-enable when sqlite fixed test.runNvim = false; - plugins.neoclip = { - enable = true; + plugins = { + sqlite-lua.enable = true; + neoclip = { + enable = true; - # This triggers the addition of `pkgs.vimPlugins.sqlite-lua` to `extraPlugins` - settings.enable_persistent_history = true; + settings.enable_persistent_history = true; + }; }; };