@@ -7,7 +7,7 @@ local M = {}
7
7
8
8
M .getUltisnipItems = function (prefix )
9
9
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' )
11
11
local complete_items = {}
12
12
if vim .tbl_isempty (snippetsList ) then
13
13
return {}
@@ -16,10 +16,6 @@ M.getUltisnipItems = function(prefix)
16
16
local kind = ' UltiSnips'
17
17
kind = opt .get_option (' customize_lsp_label' )[kind ] or kind
18
18
for key , val in pairs (snippetsList ) do
19
- -- fix lua parsing issue
20
- if key == true then
21
- key = ' true'
22
- end
23
19
local item = {}
24
20
item .word = key
25
21
item .kind = kind
33
29
34
30
M .getNeosnippetItems = function (prefix )
35
31
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' )
37
33
local complete_items = {}
38
34
if vim .tbl_isempty (snippetsList ) == 0 then
39
35
return {}
@@ -42,9 +38,6 @@ M.getNeosnippetItems = function(prefix)
42
38
kind = opt .get_option (' customize_lsp_label' )[kind ] or kind
43
39
local priority = vim .g .completion_items_priority [' Neosnippet' ]
44
40
for key , val in pairs (snippetsList ) do
45
- if key == true then
46
- key = ' true'
47
- end
48
41
local description
49
42
if val == nil or type (val ) ~= " table" then description = nil else description = val .description end
50
43
local user_data = {snippet_source = ' Neosnippet' , hover = description }
0 commit comments