2024-11-04 01:25:24 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (lib.modules) mkIf;
|
|
|
|
inherit (lib.nvim.dag) entryAnywhere;
|
2024-11-04 08:16:06 +01:00
|
|
|
inherit (lib.nvim.lua) toLuaObject;
|
|
|
|
inherit (builtins) toString;
|
|
|
|
|
|
|
|
cfg = config.vim.utility.motion.precognition;
|
2024-11-04 01:25:24 +01:00
|
|
|
in {
|
|
|
|
config =
|
|
|
|
mkIf cfg.enable
|
|
|
|
{
|
|
|
|
vim.startPlugins = [
|
|
|
|
"precognition-nvim"
|
|
|
|
];
|
|
|
|
|
|
|
|
vim.pluginRC.precognition-nvim = entryAnywhere ''
|
|
|
|
require("precognition").setup({
|
2024-11-04 08:16:06 +01:00
|
|
|
startVisible = ${toString cfg.startVisible},
|
|
|
|
showBlankVirtLine = ${toString cfg.showBlankVirtLine},
|
|
|
|
highlightColor = (${toLuaObject cfg.highlightColor}), --{ link = "Comment" },
|
|
|
|
hints = (${toLuaObject cfg.hints}),
|
|
|
|
gutterHints = (${toLuaObject cfg.gutterHints}),
|
|
|
|
disabled_fts = (${toLuaObject cfg.disabled_fts}),
|
|
|
|
});
|
2024-11-04 01:25:24 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|