-- nvim-cmp local cmp = require("cmp") cmp.setup { completion = { autocomplete = false }, snippet = { expand = function(args) require("luasnip").lsp_expand(args.body) end, }, mapping = { [''] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }), [''] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }), [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }), [''] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `` mapping. [''] = cmp.mapping({ i = cmp.mapping.abort(), c = cmp.mapping.close(), }), [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. }, sources = cmp.config.sources { { name = "nvim_lsp" }, { name = "nvim_lua" }, { name = "luasnip" }, { name = "buffer" }, { name = "path" } } }