From 0b647a209db5acd709506df510e0d9fea26aa7a3 Mon Sep 17 00:00:00 2001 From: Nowaaru Date: Mon, 4 Nov 2024 21:14:55 -0700 Subject: [PATCH 1/2] utility/precognition: de-linkify descriptions --- .../plugins/utility/motion/precognition/precognition.nix | 9 --------- 1 file changed, 9 deletions(-) diff --git a/modules/plugins/utility/motion/precognition/precognition.nix b/modules/plugins/utility/motion/precognition/precognition.nix index f1c701c8..70e12a2f 100644 --- a/modules/plugins/utility/motion/precognition/precognition.nix +++ b/modules/plugins/utility/motion/precognition/precognition.nix @@ -28,9 +28,6 @@ in { default = {link = "Comment";}; description = '' The highlight for the virtual text. - - To find more about this option, please see - [the documentation](https://github.com/tris203/precognition.nvim). ''; }; @@ -38,9 +35,6 @@ in { default = {}; description = '' What motions display and at what priority."; - - To find more about this option, please see - [the documentation](https://github.com/tris203/precognition.nvim). ''; type = attrsOf (submodule { options = { @@ -63,9 +57,6 @@ in { // { 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). ''; }; From 39e27e17a2a63a5de7016a70bb2dcaf1180c1195 Mon Sep 17 00:00:00 2001 From: Nowaaru Date: Mon, 4 Nov 2024 21:21:32 -0700 Subject: [PATCH 2/2] utility/precognition: no more rec --- .../motion/precognition/precognition.nix | 50 +++++++++---------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/modules/plugins/utility/motion/precognition/precognition.nix b/modules/plugins/utility/motion/precognition/precognition.nix index 70e12a2f..9c42e0f9 100644 --- a/modules/plugins/utility/motion/precognition/precognition.nix +++ b/modules/plugins/utility/motion/precognition/precognition.nix @@ -1,8 +1,28 @@ {lib, ...}: let inherit (lib.options) mkEnableOption mkOption literalExpression; inherit (lib.types) attrsOf listOf str bool int submodule; + + 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 { - options.vim.utility.motion.precognition = rec { + options.vim.utility.motion.precognition = { enable = mkEnableOption "precognition.nvim plugin"; startVisible = mkOption { @@ -31,34 +51,10 @@ in { ''; }; - hints = mkOption { - default = {}; - description = '' - What motions display and at what priority."; - ''; - 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; - }; - }; - }); - }; + hints = mkHintType "What motions display and at what priority."; gutterHints = - hints - // { - description = '' - What motions display and at what priority. Only appears in gutters. - ''; - }; + mkHintType "What motions display and at what priority. Only appears in gutters."; disabled_fts = mkOption { type = listOf str;