From e73f1e47fd867b496753f62851f44606c1de6757 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Fri, 8 Nov 2024 12:00:31 +0300 Subject: [PATCH] precognition: consistency changes Just my minor nits. --- .../utility/motion/precognition/config.nix | 16 +++++------ .../motion/precognition/precognition.nix | 28 ++++++++----------- 2 files changed, 19 insertions(+), 25 deletions(-) diff --git a/modules/plugins/utility/motion/precognition/config.nix b/modules/plugins/utility/motion/precognition/config.nix index e226c02..cd4ef4c 100644 --- a/modules/plugins/utility/motion/precognition/config.nix +++ b/modules/plugins/utility/motion/precognition/config.nix @@ -7,14 +7,12 @@ cfg = config.vim.utility.motion.precognition; in { - config = - mkIf cfg.enable - { - vim = { - startPlugins = ["precognition-nvim"]; - luaConfigRC.precognition = lib.nvim.dag.entryAnywhere '' - require('precognition').setup(${lib.nvim.lua.toLuaObject cfg.setupOpts}) - ''; - }; + config = mkIf cfg.enable { + vim = { + startPlugins = ["precognition-nvim"]; + luaConfigRC.precognition = lib.nvim.dag.entryAnywhere '' + require('precognition').setup(${lib.nvim.lua.toLuaObject cfg.setupOpts}) + ''; }; + }; } diff --git a/modules/plugins/utility/motion/precognition/precognition.nix b/modules/plugins/utility/motion/precognition/precognition.nix index 25fedd8..9bccf8e 100644 --- a/modules/plugins/utility/motion/precognition/precognition.nix +++ b/modules/plugins/utility/motion/precognition/precognition.nix @@ -13,30 +13,30 @@ type = str; description = "The easier-to-read depiction of the motion"; }; + prio = mkOption { type = int; + default = 1; description = "The priority of the hint"; example = 10; - default = 1; }; }; }); }; in { options.vim.utility.motion.precognition = { - enable = mkEnableOption "precognition.nvim plugin"; - + enable = mkEnableOption "assisted motion discovery[precognition.nvim]"; setupOpts = mkPluginSetupOption "precognition.nvim" { startVisible = mkOption { type = bool; - description = "Whether to start 'precognition' automatically"; default = true; + description = "Whether to start 'precognition' automatically"; }; showBlankVirtLine = mkOption { type = bool; - description = "Whether to show a blank virtual line when no movements are shown"; default = true; + description = "Whether to show a blank virtual line when no movements are shown"; }; highlightColor = mkOption { @@ -47,24 +47,20 @@ in { # or { foreground = "#0000FF"; background = "#000000"; }; ''; - description = '' - The highlight for the virtual text - ''; + description = "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 { type = listOf str; - description = "Filetypes that automatically disable 'precognition'"; - default = ["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 + ''; }; }; }