diff --git a/lua/cmp/matcher.lua b/lua/cmp/matcher.lua index 48bf96a..6ac96ec 100644 --- a/lua/cmp/matcher.lua +++ b/lua/cmp/matcher.lua @@ -79,7 +79,7 @@ end ---@param input string ---@param word string ---@param option { synonyms: string[], disallow_fullfuzzy_matching: boolean, disallow_fuzzy_matching: boolean, disallow_partial_fuzzy_matching: boolean, disallow_partial_matching: boolean, disallow_prefix_unmatching: boolean } ----@return integer +---@return integer, table matcher.match = function(input, word, option) option = option or {} diff --git a/lua/cmp/matcher_spec.lua b/lua/cmp/matcher_spec.lua index cb753df..607b2c8 100644 --- a/lua/cmp/matcher_spec.lua +++ b/lua/cmp/matcher_spec.lua @@ -40,6 +40,9 @@ describe('matcher', function() assert.is.truthy(matcher.match('emg', 'error_msg') >= 1) assert.is.truthy(matcher.match('sasr', 'saved_splitright') >= 1) + -- TODO: #1420 test-case + -- assert.is.truthy(matcher.match('asset_', '????') >= 0) + local score, matches score, matches = matcher.match('tail', 'HCDetails', { disallow_fuzzy_matching = false,