From 2f9b103d2ea5c3a127d883fc1965b620cc83dd72 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Tue, 7 Jan 2025 21:19:29 -0600 Subject: [PATCH] plugins/blink-cmp: update completion.list.selection type Changed in latest release. Making type backwards compatible with previous release. --- plugins/by-name/blink-cmp/settings-options.nix | 14 ++++++++++---- .../plugins/by-name/blink-cmp/default.nix | 5 ++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/plugins/by-name/blink-cmp/settings-options.nix b/plugins/by-name/blink-cmp/settings-options.nix index 1b530347..17c252e5 100644 --- a/plugins/by-name/blink-cmp/settings-options.nix +++ b/plugins/by-name/blink-cmp/settings-options.nix @@ -164,10 +164,16 @@ in Maximum number of items to display. ''; - selection = defaultNullOpts.mkEnumFirstDefault [ "preselect" "manual" "auto_insert" ] '' - Controls if completion items will be selected automatically, and whether selection - automatically inserts. - ''; + selection = + defaultNullOpts.mkNullableWithRaw (types.either types.str (types.attrsOf types.anything)) + { + preselect = true; + auto_insert = true; + } + '' + Controls if completion items will be selected automatically, and whether selection + automatically inserts. + ''; cycle = { from_bottom = defaultNullOpts.mkBool true '' diff --git a/tests/test-sources/plugins/by-name/blink-cmp/default.nix b/tests/test-sources/plugins/by-name/blink-cmp/default.nix index 7392402f..101fa6df 100644 --- a/tests/test-sources/plugins/by-name/blink-cmp/default.nix +++ b/tests/test-sources/plugins/by-name/blink-cmp/default.nix @@ -42,7 +42,10 @@ }; list = { max_items = 200; - selection = "preselect"; + selection = { + preselect = true; + auto_insert = true; + }; cycle = { from_bottom = true; from_top = true;