@@ -7,7 +7,7 @@ local M = {}
77
88M .getUltisnipItems = function (prefix )
99 if vim .fn .exists (" *UltiSnips#SnippetsInCurrentScope" ) == 0 then return {} end
10- local snippetsList = api . nvim_call_function (' UltiSnips#SnippetsInCurrentScope' , {} )
10+ local snippetsList = vim . call (' UltiSnips#SnippetsInCurrentScope' )
1111 local complete_items = {}
1212 if vim .tbl_isempty (snippetsList ) then
1313 return {}
@@ -16,10 +16,6 @@ M.getUltisnipItems = function(prefix)
1616 local kind = ' UltiSnips'
1717 kind = opt .get_option (' customize_lsp_label' )[kind ] or kind
1818 for key , val in pairs (snippetsList ) do
19- -- fix lua parsing issue
20- if key == true then
21- key = ' true'
22- end
2319 local item = {}
2420 item .word = key
2521 item .kind = kind
3329
3430M .getNeosnippetItems = function (prefix )
3531 if vim .fn .exists (" *neosnippet#helpers#get_completion_snippets" ) == 0 then return {} end
36- local snippetsList = api . nvim_call_function (' neosnippet#helpers#get_completion_snippets' , {} )
32+ local snippetsList = vim . call (' neosnippet#helpers#get_completion_snippets' )
3733 local complete_items = {}
3834 if vim .tbl_isempty (snippetsList ) == 0 then
3935 return {}
@@ -42,9 +38,6 @@ M.getNeosnippetItems = function(prefix)
4238 kind = opt .get_option (' customize_lsp_label' )[kind ] or kind
4339 local priority = vim .g .completion_items_priority [' Neosnippet' ]
4440 for key , val in pairs (snippetsList ) do
45- if key == true then
46- key = ' true'
47- end
4841 local description
4942 if val == nil or type (val ) ~= " table" then description = nil else description = val .description end
5043 local user_data = {snippet_source = ' Neosnippet' , hover = description }
0 commit comments