@@ -4,7 +4,7 @@ local match = require'completion.matching'
44local M = {}
55
66
7- local getUltisnipItems = function (prefix )
7+ M . getUltisnipItems = function (prefix )
88 if vim .fn .exists (" *UltiSnips#SnippetsInCurrentScope" ) == 0 then return {} end
99 local snippetsList = api .nvim_call_function (' UltiSnips#SnippetsInCurrentScope' , {})
1010 local complete_items = {}
@@ -28,7 +28,7 @@ local getUltisnipItems = function(prefix)
2828 return complete_items
2929end
3030
31- local getNeosnippetItems = function (prefix )
31+ M . getNeosnippetItems = function (prefix )
3232 if vim .fn .exists (" *neosnippet#helpers#get_completion_snippets" ) == 0 then return {} end
3333 local snippetsList = api .nvim_call_function (' neosnippet#helpers#get_completion_snippets' , {})
3434 local complete_items = {}
@@ -51,7 +51,7 @@ local getNeosnippetItems = function(prefix)
5151 return complete_items
5252end
5353
54- local getVsnipItems = function (prefix )
54+ M . getVsnipItems = function (prefix )
5555 if vim .fn .exists (' g:loaded_vsnip' ) == 0 then return {} end
5656 local snippetsList = api .nvim_call_function (' vsnip#source#find' , {api .nvim_buf_get_option (0 , ' filetype' )})
5757 local complete_items = {}
@@ -76,15 +76,15 @@ local getVsnipItems = function(prefix)
7676 return complete_items
7777end
7878
79- M .getCompletionItems = function (prefix , score_func , _ )
79+ M .getCompletionItems = function (prefix )
8080 local source = vim .g .completion_enable_snippet
8181 local snippet_list = {}
8282 if source == ' UltiSnips' then
83- snippet_list = getUltisnipItems (prefix , score_func )
83+ snippet_list = M . getUltisnipItems (prefix )
8484 elseif source == ' Neosnippet' then
85- snippet_list = getNeosnippetItems (prefix , score_func )
85+ snippet_list = M . getNeosnippetItems (prefix )
8686 elseif source == ' vim-vsnip' then
87- snippet_list = getVsnipItems (prefix , score_func )
87+ snippet_list = M . getVsnipItems (prefix )
8888 end
8989 return snippet_list
9090end
0 commit comments