precognition: consistency changes

Just my minor nits.
This commit is contained in:
raf 2024-11-08 12:00:31 +03:00
parent 706c6ab60c
commit e73f1e47fd
Signed by: NotAShelf
GPG key ID: AF26552424E53993
2 changed files with 19 additions and 25 deletions

View file

@ -7,14 +7,12 @@
cfg = config.vim.utility.motion.precognition; cfg = config.vim.utility.motion.precognition;
in { in {
config = config = mkIf cfg.enable {
mkIf cfg.enable vim = {
{ startPlugins = ["precognition-nvim"];
vim = { luaConfigRC.precognition = lib.nvim.dag.entryAnywhere ''
startPlugins = ["precognition-nvim"]; require('precognition').setup(${lib.nvim.lua.toLuaObject cfg.setupOpts})
luaConfigRC.precognition = lib.nvim.dag.entryAnywhere '' '';
require('precognition').setup(${lib.nvim.lua.toLuaObject cfg.setupOpts})
'';
};
}; };
};
} }

View file

@ -13,30 +13,30 @@
type = str; type = str;
description = "The easier-to-read depiction of the motion"; description = "The easier-to-read depiction of the motion";
}; };
prio = mkOption { prio = mkOption {
type = int; type = int;
default = 1;
description = "The priority of the hint"; description = "The priority of the hint";
example = 10; example = 10;
default = 1;
}; };
}; };
}); });
}; };
in { in {
options.vim.utility.motion.precognition = { options.vim.utility.motion.precognition = {
enable = mkEnableOption "precognition.nvim plugin"; enable = mkEnableOption "assisted motion discovery[precognition.nvim]";
setupOpts = mkPluginSetupOption "precognition.nvim" { setupOpts = mkPluginSetupOption "precognition.nvim" {
startVisible = mkOption { startVisible = mkOption {
type = bool; type = bool;
description = "Whether to start 'precognition' automatically";
default = true; default = true;
description = "Whether to start 'precognition' automatically";
}; };
showBlankVirtLine = mkOption { showBlankVirtLine = mkOption {
type = bool; type = bool;
description = "Whether to show a blank virtual line when no movements are shown";
default = true; default = true;
description = "Whether to show a blank virtual line when no movements are shown";
}; };
highlightColor = mkOption { highlightColor = mkOption {
@ -47,24 +47,20 @@ in {
# or # or
{ foreground = "#0000FF"; background = "#000000"; }; { foreground = "#0000FF"; background = "#000000"; };
''; '';
description = '' description = "The highlight for the virtual text";
The highlight for the virtual text
'';
}; };
hints = mkHintType "What motions display and at what priority";
gutterHints = mkHintType ''
What motions display and at what priority. Only appears in gutters
'';
disabled_fts = mkOption { disabled_fts = mkOption {
type = listOf str; type = listOf str;
description = "Filetypes that automatically disable 'precognition'";
default = ["startify"]; default = ["startify"];
example = literalExpression ''["startify"]''; example = literalExpression ''["startify"]'';
description = "Filetypes that automatically disable 'precognition'";
}; };
hints = mkHintType "What motions display, and at what priority";
gutterHints = mkHintType ''
What motions display and at what priority. Only appears in gutters
'';
}; };
}; };
} }