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>
This commit is contained in:
glepnir
2025-03-06 21:59:13 +01:00
committed by Christian Brabandt
parent 25e833f4ec
commit f31cfa29bf
21 changed files with 578 additions and 185 deletions

View File

@ -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 @@ A jump table for the options with a short description can be found at |Q_op|.
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 @@ A jump table for the options with a short description can be found at |Q_op|.
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