visuals: move nvim-scrollbar to its own module; switch to setupOpts

This commit is contained in:
raf 2024-10-07 00:30:18 +03:00
commit 95b09bc3a4
Signed by: NotAShelf
GPG key ID: AF26552424E53993
7 changed files with 67 additions and 35 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.nvim-scrollbar;
in {
config = mkIf cfg.enable {
vim = {
startPlugins = ["nvim-scrollbar"];
pluginRC.cursorline = entryAnywhere ''
require("scrollbar").setup(${toLuaObject cfg.setupOpts})
'';
};
};
}