2024-11-05 11:15:03 +00:00
|
|
|
{lib, ...}: let
|
2024-11-04 00:25:24 +00:00
|
|
|
inherit (lib.options) mkEnableOption mkOption literalExpression;
|
|
|
|
inherit (lib.types) attrsOf listOf str bool int submodule;
|
2024-11-05 06:40:44 +00:00
|
|
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
2024-11-05 04:21:32 +00:00
|
|
|
|
|
|
|
mkHintType = description:
|
|
|
|
mkOption {
|
|
|
|
inherit description;
|
|
|
|
default = {};
|
|
|
|
type = attrsOf (submodule {
|
|
|
|
options = {
|
|
|
|
text = mkOption {
|
|
|
|
type = str;
|
|
|
|
description = "The easier-to-read depiction of the motion.";
|
|
|
|
};
|
|
|
|
prio = mkOption {
|
|
|
|
type = int;
|
|
|
|
description = "The priority of the hint.";
|
|
|
|
example = 10;
|
|
|
|
default = 1;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
2024-11-04 07:06:41 +00:00
|
|
|
in {
|
2024-11-05 04:21:32 +00:00
|
|
|
options.vim.utility.motion.precognition = {
|
2024-11-04 00:25:24 +00:00
|
|
|
enable = mkEnableOption "precognition.nvim plugin";
|
|
|
|
|
2024-11-05 06:40:44 +00:00
|
|
|
setupOpts = mkPluginSetupOption "precognition.nvim" {
|
|
|
|
startVisible = mkOption {
|
|
|
|
type = bool;
|
|
|
|
description = "Whether to start 'precognition' automatically.";
|
|
|
|
default = true;
|
|
|
|
};
|
2024-11-04 00:25:24 +00:00
|
|
|
|
2024-11-05 06:40:44 +00:00
|
|
|
showBlankVirtLine = mkOption {
|
|
|
|
type = bool;
|
|
|
|
description = "Whether to show a blank virtual line when no movements are shown.";
|
|
|
|
default = true;
|
|
|
|
};
|
2024-11-04 00:25:24 +00:00
|
|
|
|
2024-11-05 06:40:44 +00:00
|
|
|
highlightColor = mkOption {
|
|
|
|
type = attrsOf str;
|
2024-11-05 11:15:03 +00:00
|
|
|
default = {link = "Comment";};
|
2024-11-05 06:40:44 +00:00
|
|
|
example = literalExpression ''
|
|
|
|
{ link = "Comment"; }
|
|
|
|
# or
|
|
|
|
{ foreground = "#0000FF"; background = "#000000"; };
|
|
|
|
'';
|
|
|
|
description = ''
|
|
|
|
The highlight for the virtual text.
|
|
|
|
'';
|
|
|
|
};
|
2024-11-04 00:25:24 +00:00
|
|
|
|
2024-11-05 06:40:44 +00:00
|
|
|
hints = mkHintType "What motions display and at what priority.";
|
2024-11-04 00:25:24 +00:00
|
|
|
|
2024-11-05 06:40:44 +00:00
|
|
|
gutterHints =
|
|
|
|
mkHintType "What motions display and at what priority. Only appears in gutters.";
|
2024-11-04 00:25:24 +00:00
|
|
|
|
2024-11-05 06:40:44 +00:00
|
|
|
disabled_fts = mkOption {
|
|
|
|
type = listOf str;
|
|
|
|
default = ["startify"];
|
|
|
|
example = literalExpression ''["startify"]'';
|
|
|
|
};
|
2024-11-04 00:25:24 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|