patch 9.1.1178: not possible to generate completion candidates using fuzzy matching
Problem: not possible to generate completion candidates using fuzzy
matching
Solution: add the 'completefuzzycollect' option for (some) ins-completion
modes (glepnir)
fixes #15296
fixes #15295
fixes #15294
closes: #16032
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 883a67f..6afe32f 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 9.1. Last change: 2025 Mar 03
+*options.txt* For Vim version 9.1. Last change: 2025 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2104,6 +2104,18 @@
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
+ *'completefuzzycollect'* *'cfc'*
+'completefuzzycollect' 'cfc' string (default: empty)
+ global
+ This option enables fuzzy collection for (only some) specific
+ |ins-completion| modes, adjusting how items are gathered for fuzzy
+ matching based on input.
+ The option can contain the following values (separated by commas),
+ each enabling fuzzy collection for a specific completion mode:
+ files file names
+ keyword keyword completion in 'complete' and current file
+ whole_line whole lines
+
*'completeitemalign'* *'cia'*
'completeitemalign' 'cia' string (default: "abbr,kind,menu")
global
@@ -2123,7 +2135,12 @@
fuzzy Enable |fuzzy-matching| for completion candidates. This
allows for more flexible and intuitive matching, where
characters can be skipped and matches can be found even
- if the exact sequence is not typed.
+ if the exact sequence is not typed. Note: This option
+ does not affect the collection of candidate list, it only
+ controls how completion candidates are reduced from the
+ list of alternatives. If you want to use |fuzzy-matching|
+ to gather more alternatives for your candidate list,
+ see |'completefuzzycollect'|.
longest Only insert the longest common text of the matches. If
the menu is displayed you can use CTRL-L to add more