return { { "hrsh7th/nvim-cmp", event = "InsertEnter", dependencies = { "hrsh7th/cmp-nvim-lua", "hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-path", "hrsh7th/cmp-buffer", "hrsh7th/cmp-vsnip", "hrsh7th/vim-vsnip", "onsails/lspkind-nvim", }, config = function() local cmp = require("cmp") local sources = { { name = "nvim_lua" }, { name = "nvim_lsp" }, { name = "path" }, { name = "buffer" }, } cmp.setup({ snippet = { expand = function(args) vim.fn["vsnip#anonymous"](args.body) end, }, mapping = cmp.mapping.preset.insert({ [""] = cmp.mapping.confirm({ select = true }), }), sources = sources, formatting = { format = require("lspkind").cmp_format() }, }) end, }, }