fix(nvim): fidget symbol, ltex

This commit is contained in:
Léana 江 2023-02-28 07:35:34 +01:00
parent bc0ef751e8
commit 1ee2260fa8
5 changed files with 30 additions and 23 deletions

View file

@ -15,30 +15,14 @@ cmp.setup({
['<C-u>'] = cmp.mapping.scroll_docs(4),
-- ['<C-Space>'] = cmp.mapping.complete(),
['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
behavior = cmp.ConfirmBehavior.Insert,
select = true,
},
['<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
end, { 'i', 's' }),
['<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
end, { 'i', 's' }),
['<Tab>'] = cmp.mapping.select_next_item(),
['<S-Tab>'] = cmp.mapping.select_prev_item(),
},
sources = {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = "nvim_lsp" },
{ name = "luasnip" },
},
})