This repository was archived by the owner on Oct 13, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,10 @@ local function fuzzy_score(str1, str2)
45
45
end
46
46
47
47
local function fuzzy_match (prefix , word )
48
+ if vim .g .completion_matching_ignore_case == 1 then
49
+ prefix = string.lower (prefix )
50
+ word = string.lower (word )
51
+ end
48
52
local score = fuzzy_score (prefix , word )
49
53
if score < 1 then
50
54
return true , score
55
59
56
60
57
61
local function substring_match (prefix , word )
62
+ if vim .g .completion_matching_ignore_case == 1 then
63
+ prefix = string.lower (prefix )
64
+ word = string.lower (word )
65
+ end
58
66
if string.find (word , prefix ) then
59
67
return true
60
68
else
@@ -63,6 +71,10 @@ local function substring_match(prefix, word)
63
71
end
64
72
65
73
local function exact_match (prefix , word )
74
+ if vim .g .completion_matching_ignore_case == 1 then
75
+ prefix = string.lower (prefix )
76
+ word = string.lower (word )
77
+ end
66
78
if vim .startswith (word , prefix ) then
67
79
return true
68
80
else
Original file line number Diff line number Diff line change @@ -77,6 +77,10 @@ if ! exists('g:completion_fuzzy_match')
77
77
let g: completion_enable_fuzzy_match = 0
78
78
endif
79
79
80
+ if ! exists (' g:completion_matching_ignore_case' )
81
+ let g: completion_matching_ignore_case = 0
82
+ endif
83
+
80
84
if ! exists (' g:completion_matching_strategy_list' )
81
85
let g: completion_matching_strategy_list = [' exact' ]
82
86
endif
You can’t perform that action at this time.
0 commit comments