From c721614f76ee7c922fe7c75ba0f6288e89e69328 Mon Sep 17 00:00:00 2001 From: newbie Date: Wed, 6 Dec 2023 12:06:40 +0800 Subject: [PATCH] updatye --- lua/plugs/nvim-lspconfig.lua | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/lua/plugs/nvim-lspconfig.lua b/lua/plugs/nvim-lspconfig.lua index c0c3872..c75f3e2 100644 --- a/lua/plugs/nvim-lspconfig.lua +++ b/lua/plugs/nvim-lspconfig.lua @@ -133,7 +133,7 @@ return { } require("symbols-outline").setup(opts) G.map({ - { "n", "o", "SymbolsOutline" }, + { "n", "cs-o>", "SymbolsOutline" }, }) end }, @@ -208,6 +208,28 @@ return { view = { entries = { name = 'wildmenu', separator = '|' } }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.confirm({ select = true }), + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif vim.fn["vsnip#available"](1) == 1 then + feedkey("(vsnip-expand-or-jump)", "") + elseif has_words_before() then + cmp.complete() + else + fallback() + end + end, { "i", "s" }), + + [""] = cmp.mapping(function() + if cmp.visible() then + cmp.select_prev_item() + elseif vim.fn["vsnip#jumpable"](-1) == 1 then + feedkey("(vsnip-jump-prev)", "") + end + end, { "i", "s" }), + }), }) end, },