11local vim = vim
22local api = vim .api
33local match = require ' completion.matching'
4+ local opt = require ' completion.option'
45local M = {}
56
67
@@ -12,14 +13,16 @@ M.getUltisnipItems = function(prefix)
1213 return {}
1314 end
1415 local priority = vim .g .completion_items_priority [' UltiSnips' ] or 1
16+ local kind = ' UltiSnips'
17+ kind = opt .get_option (' customize_lsp_label' )[kind ] or kind
1518 for key , val in pairs (snippetsList ) do
1619 -- fix lua parsing issue
1720 if key == true then
1821 key = ' true'
1922 end
2023 local item = {}
2124 item .word = key
22- item .kind = ' UltiSnips '
25+ item .kind = kind
2326 item .priority = priority
2427 local user_data = {hover = val }
2528 item .user_data = user_data
@@ -35,6 +38,8 @@ M.getNeosnippetItems = function(prefix)
3538 if vim .tbl_isempty (snippetsList ) == 0 then
3639 return {}
3740 end
41+ local kind = ' Neosnippet'
42+ kind = opt .get_option (' customize_lsp_label' )[kind ] or kind
3843 local priority = vim .g .completion_items_priority [' Neosnippet' ]
3944 for key , val in pairs (snippetsList ) do
4045 if key == true then
@@ -43,7 +48,7 @@ M.getNeosnippetItems = function(prefix)
4348 local user_data = {hover = val .description }
4449 local item = {}
4550 item .word = key
46- item .kind = ' Neosnippet '
51+ item .kind = kind
4752 item .priority = priority
4853 item .user_data = user_data
4954 match .matching (complete_items , prefix , item )
@@ -58,14 +63,16 @@ M.getVsnipItems = function(prefix)
5863 if vim .tbl_isempty (snippetsList ) == 0 then
5964 return {}
6065 end
66+ local kind = ' vim-vsnip'
67+ kind = opt .get_option (' customize_lsp_label' )[kind ] or kind
6168 local priority = vim .g .completion_items_priority [' vim-vsnip' ]
6269 for _ , source in pairs (snippetsList ) do
6370 for _ , snippet in pairs (source ) do
6471 for _ , word in pairs (snippet .prefix ) do
6572 local user_data = {hover = snippet .description }
6673 local item = {}
6774 item .word = word
68- item .kind = ' vim-vsnip '
75+ item .kind = kind
6976 item .menu = snippet .label
7077 item .priority = priority
7178 item .user_data = user_data
0 commit comments