blink: auto-show docs by default

This commit is contained in:
Ching Pei Yang 2024-12-23 20:45:17 +01:00
parent 57a6abc063
commit a0d75f9182
No known key found for this signature in database
GPG key ID: B3841364253DC4C8

View file

@ -1,8 +1,9 @@
{lib, ...}: let {lib, ...}: let
inherit (lib.options) mkEnableOption mkOption literalMD; 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.types) mkPluginSetupOption luaInline;
inherit (lib.nvim.binds) mkMappingOption; inherit (lib.nvim.binds) mkMappingOption;
inherit (lib.nvim.config) mkBool;
keymapType = submodule { keymapType = submodule {
freeformType = attrsOf (listOf (either str luaInline)); freeformType = attrsOf (listOf (either str luaInline));
@ -31,14 +32,25 @@ in {
sources = { sources = {
default = mkOption { default = mkOption {
type = listOf str; type = listOf str;
description = "Default list of sources to enable for completion.";
default = ["lsp" "path" "snippets" "buffer"]; default = ["lsp" "path" "snippets" "buffer"];
description = "Default list of sources to enable for completion.";
}; };
providers = mkOption { providers = mkOption {
type = attrsOf providerType; type = attrsOf providerType;
description = "Providers";
default = {}; 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";
};
}; };
}; };