------------------------------------------------------------------------------- -- - LSP completion config - ------------------------------------------------------------------------------- -- Set completeopt to have a better completion experience vim.o.completeopt = "menu,menuone,noselect" local cmp = require'cmp' cmp.setup { snippet = { expand = function(args) vim.fn["UltiSnips#Anon"](args.body) end, }, mapping = { [''] = cmp.mapping.scroll_docs(-4), [''] = cmp.mapping.scroll_docs(4), [''] = cmp.mapping.complete(), [''] = cmp.mapping.close(), [''] = cmp.mapping.confirm({ select = true }), }, sources = { { name = 'nvim_lsp' }, { name = 'ultisnips' }, { name = 'buffer' }, } }