File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -532,11 +532,21 @@ function Snippet:get_completions(prefix)
532532 return results
533533 end
534534
535+ local snippet_prefix_match = function (p )
536+ for _ , item in ipairs (p ) do
537+ if vim .startswith (item :lower (), prefix :lower ()) then
538+ return true
539+ end
540+ end
541+ return false
542+ end
543+
535544 local snippets = self .cache [ft ]
536545 for trigger , snippet_data in pairs (snippets ) do
537- local snippet_prefix = snippet_data .prefix
546+ local snippet_prefix = type (snippet_data .prefix ) == ' string' and { snippet_data .prefix }
547+ or snippet_data .prefix
538548 if
539- vim . startswith ( snippet_prefix : lower (), prefix : lower () )
549+ snippet_prefix_match ( snippet_data . prefix )
540550 or (
541551 vim .o .completeopt :find (' fuzzy' )
542552 and next (vim .fn .matchfuzzy ({ snippet_prefix }, prefix :lower ())) ~= nil
You can’t perform that action at this time.
0 commit comments