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

This commit is contained in:
raf 2024-10-06 23:48:12 +03:00
commit db54345de1
Signed by: NotAShelf
GPG key ID: AF26552424E53993
7 changed files with 78 additions and 29 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.cursorline;
in {
config = mkIf cfg.enable {
vim = {
startPlugins = ["nvim-cursorline"];
pluginRC.cursorline = entryAnywhere ''
require("nvim-cursorline").setup(${toLuaObject cfg.setupOpts})
'';
};
};
}