diff --git a/init.vim b/init.vim index 1ca7bf6..49ebbe9 100644 --- a/init.vim +++ b/init.vim @@ -87,9 +87,13 @@ Plug 'neovim/nvim-lspconfig' Plug 'anott03/nvim-lspinstall' Plug 'nvim-lua/lsp-status.nvim' -Plug 'ms-jpq/coq_nvim', {'branch': 'coq'} -Plug 'ms-jpq/coq.artifacts', {'branch': 'artifacts'} -Plug 'ms-jpq/coq.thirdparty', {'branch': '3p'} +Plug 'hrsh7th/cmp-nvim-lsp' +Plug 'hrsh7th/cmp-buffer' +Plug 'hrsh7th/cmp-path' +Plug 'hrsh7th/cmp-cmdline' +Plug 'hrsh7th/nvim-cmp' + +Plug 'quangnguyen30192/cmp-nvim-ultisnips' " Inserting unicode characters. Plug 'chrisbra/unicode.vim' @@ -223,8 +227,44 @@ endfunction " and also gives some documentation preview. set completeopt=menuone,noinsert,noselect -let g:coq_settings = {'auto_start': 'shut-up', 'keymap.recommended': v:false, 'display.icons.mode': 'none'} -lua require'coq' +lua << EOF + +local cmp = require'cmp' +cmp.setup({ + snippet = { + expand = function(args) + vim.fn["UltiSnips#Anon"](args.body) + end, + }, + mapping = { + [''] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), + [''] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), + --[''] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }), + --[''] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }), + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.close(), + [''] = cmp.mapping.confirm({ + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }), + }, + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + { name = 'ultisnips' }, + { name = 'buffer' }, + }), +}) + +--local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()) +-- -- Replace with each lsp server you've enabled. +-- require('lspconfig')[''].setup { +-- capabilities = capabilities +-- } + +EOF + "============================ A Nice Color Scheme ==============================