return { { "hrsh7th/nvim-cmp", dependencies = { "L3MON4D3/LuaSnip", -- Snippet engine "saadparwaiz1/cmp_luasnip", -- nvim-cmp source for LuaSnip "hrsh7th/cmp-nvim-lsp", -- nvim-cmp source for LSP -- Add other cmp sources as needed (e.g., cmp-path, cmp-buffer) }, config = function() local cmp = require("cmp") local luasnip = require("luasnip") cmp.setup({ sources = { { name = "copilot" }, { name = "nvim_lsp" }, { name = "path" }, { name = "luasnip" }, { name = "buffer" }, -- Add other sources here }, mapping = cmp.mapping.preset.insert({ -- Keybindings for navigation and confirmation [""] = cmp.mapping.select_next_item(), [""] = cmp.mapping.select_prev_item(), [""] = cmp.mapping.confirm({ select = true }), [""] = cmp.mapping.complete(), -- Add more mappings as desired }), snippet = { expand = function(args) luasnip.lsp_expand(args.body) end, }, -- Other cmp options like completion settings, window configuration, etc. }) end, }, }