aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/options.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-03-27 08:02:45 +0800
committerGitHub <noreply@github.com>2025-03-27 08:02:45 +0800
commitce590e207720ec53a4592882840725bf8540c7d5 (patch)
tree6dc54fcd969c977ad35c02fc6ad3c5ce91f74e27 /src/nvim/options.lua
parent9acb52c8f386ea0a026ba4e314e1294da66f8e79 (diff)
parent0af780e8df849f6d393873124afaa31681ab43ec (diff)
downloadrneovim-ce590e207720ec53a4592882840725bf8540c7d5.tar.gz
rneovim-ce590e207720ec53a4592882840725bf8540c7d5.tar.bz2
rneovim-ce590e207720ec53a4592882840725bf8540c7d5.zip
Merge pull request #30189 from zeertzjq/vim-9.1.0598
vim-patch: 'completefuzzycollect' option
Diffstat (limited to 'src/nvim/options.lua')
-rw-r--r--src/nvim/options.lua44
1 files changed, 40 insertions, 4 deletions
diff --git a/src/nvim/options.lua b/src/nvim/options.lua
index bb63ff638b..f566582c0c 100644
--- a/src/nvim/options.lua
+++ b/src/nvim/options.lua
@@ -1460,6 +1460,40 @@ local options = {
varname = 'p_cfu',
},
{
+ abbreviation = 'cfc',
+ defaults = '',
+ values = { 'keyword', 'files', 'whole_line' },
+ flags = true,
+ deny_duplicates = true,
+ desc = [=[
+ A comma-separated list of strings to enable fuzzy collection for
+ specific |ins-completion| modes, affecting how matches are gathered
+ during completion. For specified modes, fuzzy matching is used to
+ find completion candidates instead of the standard prefix-based
+ matching. This option can contain the following values:
+
+ keyword keywords in the current file |i_CTRL-X_CTRL-N|
+ keywords with flags ".", "w", |i_CTRL-N| |i_CTRL-P|
+ "b", "u", "U" and "k{dict}" in 'complete'
+ keywords in 'dictionary' |i_CTRL-X_CTRL-K|
+
+ files file names |i_CTRL-X_CTRL-F|
+
+ whole_line whole lines |i_CTRL-X_CTRL-L|
+
+ When using the 'completeopt' "longest" option value, fuzzy collection
+ can identify the longest common string among the best fuzzy matches
+ and insert it automatically.
+ ]=],
+ full_name = 'completefuzzycollect',
+ list = 'onecomma',
+ scope = { 'global' },
+ short_desc = N_('use fuzzy collection for specific completion modes'),
+ type = 'string',
+ varname = 'p_cfc',
+ flags_varname = 'cfc_flags',
+ },
+ {
abbreviation = 'cia',
cb = 'did_set_completeitemalign',
defaults = 'abbr,kind,menu',
@@ -1505,10 +1539,12 @@ local options = {
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. Only makes a
- difference how completion candidates are reduced from the
- list of alternatives, but not how the candidates are
- collected (using different completion types).
+ 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