visuals: move highlight-undo to its own module; deprecate old opts

Upstream cucked us.
This commit is contained in:
raf 2024-10-07 03:00:01 +03:00
commit 901038145d
Signed by: NotAShelf
GPG key ID: AF26552424E53993
6 changed files with 68 additions and 100 deletions

View file

@ -0,0 +1,21 @@
{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.nvim.lua) toLuaObject;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.visuals.highlight-undo;
in {
config = mkIf cfg.enable {
vim = {
startPlugins = ["highlight-undo"];
pluginRC.highlight-undo = entryAnywhere ''
require("highlight-undo").setup(${toLuaObject cfg.setupOpts})
'';
};
};
}