local M = {} function M.setup() local cmp = require 'cmp' cmp.setup({ -- documentation = true, sources = { { name = 'nvim_lsp' }, { name = 'nvim_lua' }, { name = 'buffer' }, { name = 'path' }, { name = 'vsnip' }, -- { name = 'nvim_lsp_signature_help' }, }, formatting = { format = require 'lspkind'.cmp_format({ -- mode = 'symbol', }), }, window = { -- completion = cmp.config.window.bordered(), -- documentation = cmp.config.window.bordered(), }, mapping = cmp.mapping.preset.insert({ [''] = cmp.mapping.confirm({ select = false }) }), snippet = { expand = function(args) -- For `vsnip` user. vim.fn['vsnip#anonymous'](args.body) -- For `vsnip` user. end } }) end return M