From 2dc1a7fd19c46c2f55872474610a36b6c171e4a2 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Mon, 23 Dec 2024 20:45:17 +0100 Subject: [PATCH] blink: auto-show docs by default --- .../plugins/completion/blink-cmp/blink-cmp.nix | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/modules/plugins/completion/blink-cmp/blink-cmp.nix b/modules/plugins/completion/blink-cmp/blink-cmp.nix index 7ca36f57..5a374940 100644 --- a/modules/plugins/completion/blink-cmp/blink-cmp.nix +++ b/modules/plugins/completion/blink-cmp/blink-cmp.nix @@ -1,8 +1,9 @@ {lib, ...}: let inherit (lib.options) mkEnableOption mkOption literalMD; - inherit (lib.types) listOf str either attrsOf submodule enum anything; + inherit (lib.types) listOf str either attrsOf submodule enum anything int; inherit (lib.nvim.types) mkPluginSetupOption luaInline; inherit (lib.nvim.binds) mkMappingOption; + inherit (lib.nvim.config) mkBool; keymapType = submodule { freeformType = attrsOf (listOf (either str luaInline)); @@ -31,14 +32,25 @@ in { sources = { default = mkOption { type = listOf str; - description = "Default list of sources to enable for completion."; default = ["lsp" "path" "snippets" "buffer"]; + description = "Default list of sources to enable for completion."; }; providers = mkOption { type = attrsOf providerType; - description = "Providers"; default = {}; + description = "Providers"; + }; + }; + + completion = { + documentation = { + auto_show = mkBool true "Show documentation whenever an item is selected"; + auto_show_delay_ms = mkOption { + type = int; + default = 200; + description = "Delay before auto show triggers"; + }; }; };