|
|
|
|
@ -325,10 +325,7 @@ if has("nvim")
|
|
|
|
|
cmp.setup({
|
|
|
|
|
snippet = {
|
|
|
|
|
expand = function(args)
|
|
|
|
|
-- vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
|
|
|
|
-- require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
|
|
|
|
vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
|
|
|
|
-- require'snippy'.expand_snippet(args.body) -- For `snippy` users.
|
|
|
|
|
vim.fn["UltiSnips#Anon"](args.body)
|
|
|
|
|
end,
|
|
|
|
|
},
|
|
|
|
|
mapping = {
|
|
|
|
|
@ -340,8 +337,6 @@ if has("nvim")
|
|
|
|
|
['<tab>'] = cmp.mapping(function(fallback)
|
|
|
|
|
if cmp.visible() then
|
|
|
|
|
cmp.select_next_item()
|
|
|
|
|
-- elseif luasnip.expand_or_jumpable() then
|
|
|
|
|
-- luasnip.expand_or_jump()
|
|
|
|
|
else
|
|
|
|
|
fallback()
|
|
|
|
|
end
|
|
|
|
|
@ -349,8 +344,6 @@ if has("nvim")
|
|
|
|
|
['<S-tab>'] = cmp.mapping(function(fallback)
|
|
|
|
|
if cmp.visible() then
|
|
|
|
|
cmp.select_prev_item()
|
|
|
|
|
-- elseif luasnip.jumpable(-1) then
|
|
|
|
|
-- luasnip.jump(-1)
|
|
|
|
|
else
|
|
|
|
|
fallback()
|
|
|
|
|
end
|
|
|
|
|
@ -359,10 +352,7 @@ if has("nvim")
|
|
|
|
|
sources = cmp.config.sources({
|
|
|
|
|
{ name = 'nvim_lsp' },
|
|
|
|
|
{ name = 'nvim_lua' },
|
|
|
|
|
-- { name = 'vsnip' }, -- For vsnip users.
|
|
|
|
|
-- { name = 'luasnip' }, -- For luasnip users.
|
|
|
|
|
{ name = 'ultisnips' }, -- For ultisnips users.
|
|
|
|
|
-- { name = 'snippy' }, -- For snippy users.
|
|
|
|
|
{ name = 'ultisnips' },
|
|
|
|
|
{ name = 'path' },
|
|
|
|
|
}, {
|
|
|
|
|
{ name = 'buffer', keyword_length = 5},
|
|
|
|
|
|