This repository was archived by the owner on Oct 13, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,6 +45,10 @@ local function fuzzy_score(str1, str2)
4545end
4646
4747local 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
4852 local score = fuzzy_score (prefix , word )
4953 if score < 1 then
5054 return true , score
5559
5660
5761local 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
5866 if string.find (word , prefix ) then
5967 return true
6068 else
@@ -63,6 +71,10 @@ local function substring_match(prefix, word)
6371end
6472
6573local 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
6678 if vim .startswith (word , prefix ) then
6779 return true
6880 else
Original file line number Diff line number Diff line change @@ -77,6 +77,10 @@ if ! exists('g:completion_fuzzy_match')
7777 let g: completion_enable_fuzzy_match = 0
7878endif
7979
80+ if ! exists (' g:completion_matching_ignore_case' )
81+ let g: completion_matching_ignore_case = 0
82+ endif
83+
8084if ! exists (' g:completion_matching_strategy_list' )
8185 let g: completion_matching_strategy_list = [' exact' ]
8286endif
You can’t perform that action at this time.
0 commit comments