nvf/modules/plugins/utility/motion/precognition/precognition.nix

68 lines
1.8 KiB
Nix
Raw Normal View History

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;
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;
};
};
});
};
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";
setupOpts = mkPluginSetupOption "precognition.nvim" {
startVisible = mkOption {
type = bool;
description = "Whether to start 'precognition' automatically.";
default = true;
};
2024-11-04 00:25:24 +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
highlightColor = mkOption {
type = attrsOf str;
2024-11-05 11:15:03 +00:00
default = {link = "Comment";};
example = literalExpression ''
{ link = "Comment"; }
# or
{ foreground = "#0000FF"; background = "#000000"; };
'';
description = ''
The highlight for the virtual text.
'';
};
2024-11-04 00:25:24 +00:00
hints = mkHintType "What motions display and at what priority.";
2024-11-04 00:25:24 +00:00
gutterHints =
mkHintType "What motions display and at what priority. Only appears in gutters.";
2024-11-04 00:25:24 +00:00
disabled_fts = mkOption {
type = listOf str;
default = ["startify"];
example = literalExpression ''["startify"]'';
};
2024-11-04 00:25:24 +00:00
};
};
}