This commit is contained in:
newbie 2023-12-06 12:06:40 +08:00
parent 158941ec4b
commit c721614f76

View File

@ -133,7 +133,7 @@ return {
} }
require("symbols-outline").setup(opts) require("symbols-outline").setup(opts)
G.map({ G.map({
{ "n", "<leader>o", "<cmd>SymbolsOutline<cr>" }, { "n", "cs-o>", "<cmd>SymbolsOutline<cr>" },
}) })
end end
}, },
@ -208,6 +208,28 @@ return {
view = { view = {
entries = { name = 'wildmenu', separator = '|' } entries = { name = 'wildmenu', separator = '|' }
}, },
mapping = cmp.mapping.preset.insert({
['<CR>'] = cmp.mapping.confirm({ select = true }),
["<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()
elseif vim.fn["vsnip#jumpable"](-1) == 1 then
feedkey("<Plug>(vsnip-jump-prev)", "")
end
end, { "i", "s" }),
}),
}) })
end, end,
}, },