2024-11-04 08:06:41 +01:00
|
|
|
{lib, ...}: let
|
2024-11-04 01:25:24 +01:00
|
|
|
inherit (lib.options) mkEnableOption mkOption literalExpression;
|
|
|
|
inherit (lib.types) attrsOf listOf str bool int submodule;
|
2024-11-04 08:06:41 +01:00
|
|
|
in {
|
2024-11-04 01:25:24 +01:00
|
|
|
options.vim.utility.motion.precognition = rec {
|
|
|
|
enable = mkEnableOption "precognition.nvim plugin";
|
|
|
|
|
|
|
|
startVisible = mkOption {
|
|
|
|
type = bool;
|
2024-11-04 08:06:41 +01:00
|
|
|
description = "Whether to start 'precognition' automatically.";
|
2024-11-04 01:25:24 +01:00
|
|
|
default = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
showBlankVirtLine = mkOption {
|
|
|
|
type = bool;
|
2024-11-04 08:06:41 +01:00
|
|
|
description = "Whether to show a blank virtual line when no movements are shown.";
|
2024-11-04 01:25:24 +01:00
|
|
|
default = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
highlightColor = mkOption {
|
|
|
|
type = attrsOf str;
|
|
|
|
|
|
|
|
example = literalExpression ''
|
|
|
|
{ link = "Comment"; }
|
|
|
|
# or
|
2024-11-04 08:06:41 +01:00
|
|
|
{ foreground = "#0000FF"; background = "#000000"; };
|
2024-11-04 01:25:24 +01:00
|
|
|
'';
|
2024-11-04 08:06:41 +01:00
|
|
|
default = {link = "Comment";};
|
2024-11-04 08:42:12 +01:00
|
|
|
description = ''
|
|
|
|
The highlight for the virtual text.
|
|
|
|
|
|
|
|
To find more about this option, please see
|
|
|
|
[the documentation](https://github.com/tris203/precognition.nvim).
|
|
|
|
'';
|
2024-11-04 01:25:24 +01:00
|
|
|
};
|
|
|
|
|
2024-11-04 08:12:07 +01:00
|
|
|
hints = mkOption {
|
|
|
|
default = {};
|
2024-11-04 08:42:12 +01:00
|
|
|
description = ''
|
|
|
|
What motions display and at what priority.";
|
|
|
|
|
|
|
|
To find more about this option, please see
|
|
|
|
[the documentation](https://github.com/tris203/precognition.nvim).
|
|
|
|
'';
|
2024-11-04 01:25:24 +01:00
|
|
|
type = attrsOf (submodule {
|
|
|
|
options = {
|
|
|
|
text = mkOption {
|
|
|
|
type = str;
|
|
|
|
description = "The easier-to-read depiction of the motion.";
|
|
|
|
};
|
2024-11-04 08:12:07 +01:00
|
|
|
prio = mkOption {
|
2024-11-04 01:36:39 +01:00
|
|
|
type = int;
|
2024-11-04 01:25:24 +01:00
|
|
|
description = "The priority of the hint.";
|
2024-11-04 01:36:39 +01:00
|
|
|
example = 10;
|
|
|
|
default = 1;
|
2024-11-04 01:25:24 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2024-11-04 08:48:31 +01:00
|
|
|
gutterHints =
|
|
|
|
hints
|
|
|
|
// {
|
2024-11-04 08:42:12 +01:00
|
|
|
description = ''
|
|
|
|
What motions display and at what priority. Only appears in gutters.
|
|
|
|
|
|
|
|
To find more about this option, please see
|
|
|
|
[the documentation](https://github.com/tris203/precognition.nvim).
|
|
|
|
'';
|
|
|
|
};
|
2024-11-04 01:25:24 +01:00
|
|
|
|
|
|
|
disabled_fts = mkOption {
|
|
|
|
type = listOf str;
|
2024-11-04 08:06:41 +01:00
|
|
|
default = ["startify"];
|
2024-11-04 08:42:12 +01:00
|
|
|
example = literalExpression ''["startify"]'';
|
2024-11-04 01:25:24 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|