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/src/option.h b/src/option.h
index 182ab26..5714e0c 100644
--- a/src/option.h
+++ b/src/option.h
@@ -514,6 +514,8 @@
EXTERN int p_confirm; // 'confirm'
#endif
EXTERN int p_cp; // 'compatible'
+EXTERN char_u *p_cfc; // 'completefuzzycollect'
+EXTERN unsigned cfc_flags; // flags from "completefuzzycollect"
EXTERN char_u *p_cia; // 'completeitemalign'
EXTERN unsigned cia_flags; // order flags of 'completeitemalign'
EXTERN char_u *p_cot; // 'completeopt'
@@ -533,6 +535,11 @@
#define COT_FUZZY 0x100 // TRUE: fuzzy match enabled
#define COT_NOSORT 0x200 // TRUE: fuzzy match without qsort score
#define COT_PREINSERT 0x400 // TRUE: preinsert
+
+#define CFC_KEYWORD 0x001
+#define CFC_FILES 0x002
+#define CFC_WHOLELINE 0x004
+
#ifdef BACKSLASH_IN_FILENAME
EXTERN char_u *p_csl; // 'completeslash'
#endif