update lspconfig
This commit is contained in:
parent
d6950258d7
commit
317c612f41
@ -179,9 +179,10 @@ return {
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'buffer' },
|
||||
{ name = 'path' },
|
||||
{ name = 'cmdline' },
|
||||
-- { name = 'cmdline' },
|
||||
}),
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
|
||||
["<CR>"] = cmp.mapping({
|
||||
i = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }),
|
||||
c = function(fallback)
|
||||
@ -268,7 +269,7 @@ return {
|
||||
-- })
|
||||
},
|
||||
}
|
||||
cmp.setup.cmdline('/', {
|
||||
cmp.setup.cmdline({ '/', '?' }, {
|
||||
view = {
|
||||
entries = { name = 'wildmenu', separator = '|' }
|
||||
},
|
||||
@ -289,6 +290,38 @@ return {
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
|
||||
["<n-p>"] = cmp.mapping(function()
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif vim.fn["vsnip#jumpable"](-1) == 1 then
|
||||
feedkey("<Plug>(vsnip-jump-prev)", "")
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
}),
|
||||
})
|
||||
cmp.setup.cmdline(':', {
|
||||
view = {
|
||||
entries = { name = 'wildmenu', separator = '|' }
|
||||
},
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'buffer' },
|
||||
}),
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
|
||||
['<CR>'] = cmp.mapping.confirm({ select = false }),
|
||||
|
||||
["<c-n>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif vim.fn["vsnip#available"](1) == 1 then
|
||||
feedkey("<Plug>(vsnip-expand-or-jump)", "")
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
|
||||
["<n-p>"] = cmp.mapping(function()
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
|
Loading…
Reference in New Issue
Block a user