From fe6beaf9d4066c8e069de0d5eec8c5a3228b189f Mon Sep 17 00:00:00 2001 From: Alexander Nortung Date: Mon, 18 Jul 2022 15:56:13 +0200 Subject: [PATCH] nvim-cmp: added confirmation config option --- plugins/completion/nvim-cmp/default.nix | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/plugins/completion/nvim-cmp/default.nix b/plugins/completion/nvim-cmp/default.nix index b569f188d..63dcfa436 100644 --- a/plugins/completion/nvim-cmp/default.nix +++ b/plugins/completion/nvim-cmp/default.nix @@ -130,6 +130,19 @@ in }; })); }; + + confirmation = mkOption { + default = null; + type = types.nullOr (types.submodule ({...}: { + options = { + get_commit_characters = mkOption { + default = null; + type = types.nullOr types.str; + description = "Direct lua code as a string"; + }; + }; + })); + }; }; config = let @@ -154,7 +167,11 @@ in autocomplete = if (isNull cfg.completion.autocomplete) then null else mkRaw cfg.completion.autocomplete; completeopt = cfg.completion.completeopt; }; - # confirmation = cfg.confirmation; + confirmation = if (isNull cfg.confirmation) then null else { + get_commit_characters = + if (isString cfg.confirmation.get_commit_characters) then helpers.mkRaw cfg.confirmation.get_commit_characters + else cfg.confirmation.get_commit_characters; + }; # formatting = cfg.formatting; # matching = cfg.matching; # sorting = cfg.sorting;