{ opts = { completeopt = [ "menu" "menuone" "noselect"]; }; extraConfigLua = '' vim.opt.shortmess:append "c" ''; plugins = { cmp = { enable = true; settings = { sources = [ { name = "nvim_lsp"; } { name = "async_path"; } { name = "buffer"; } ]; mapping = { "" = "cmp.mapping.select_next_item { behavior = cmp.SelectBehavior.Insert }"; "" = "cmp.mapping.select_prev_item { behavior = cmp.SelectBehavior.Insert }"; "" = '' cmp.mapping( cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Insert, select = true, }, { "i", "c" } ) ''; "" = '' cmp.mapping(function() if cmp.visible() then cmp.close() else cmp.complete() end end) ''; }; }; }; cmp-async-path.enable = true; cmp-buffer.enable = true; cmp-nvim-lsp.enable = true; lspkind = { enable = true; cmp.enable = true; }; }; }