mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 17:58:38 +02:00
plugins/neoclip: sqlite-lua assertion
This commit is contained in:
parent
e3e3774177
commit
b42d4588ae
2 changed files with 33 additions and 8 deletions
|
@ -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`.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue