aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
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 /runtime/lua/vim
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 'runtime/lua/vim')
-rw-r--r--runtime/lua/vim/_meta/options.lua35
1 files changed, 31 insertions, 4 deletions
diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua
index 46366d585b..20d8ac3058 100644
--- a/runtime/lua/vim/_meta/options.lua
+++ b/runtime/lua/vim/_meta/options.lua
@@ -1044,6 +1044,31 @@ vim.o.cfu = vim.o.completefunc
vim.bo.completefunc = vim.o.completefunc
vim.bo.cfu = vim.bo.completefunc
+--- 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.
+---
+--- @type string
+vim.o.completefuzzycollect = ""
+vim.o.cfc = vim.o.completefuzzycollect
+vim.go.completefuzzycollect = vim.o.completefuzzycollect
+vim.go.cfc = vim.go.completefuzzycollect
+
--- A comma-separated list of strings that controls the alignment and
--- display order of items in the popup menu during Insert mode
--- completion. The supported values are "abbr", "kind", and "menu".
@@ -1063,10 +1088,12 @@ vim.go.cia = vim.go.completeitemalign
--- 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