plugins/nvim-cmp: add alwaysComplete option

Disabling this option makes the completion window not popup by default,
requiring manual activation.
This commit is contained in:
jacekpoz 2024-04-14 22:10:41 +02:00
commit b93ce3ced8
No known key found for this signature in database
3 changed files with 13 additions and 2 deletions

View file

@ -1,11 +1,17 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption mkOption literalMD;
inherit (lib.nvim.binds) mkMappingOption;
inherit (lib.types) enum attrsOf nullOr str;
inherit (lib.types) enum attrsOf nullOr str bool;
in {
options.vim = {
autocomplete = {
enable = mkEnableOption "enable autocomplete" // {default = false;};
enable = mkEnableOption "autocomplete" // {default = false;};
alwaysComplete = mkOption {
type = bool;
description = "Automatically show completion.";
default = true;
};
mappings = {
complete = mkMappingOption "Complete [nvim-cmp]" "<C-Space>";