From f7cee27291522965d706de2ffb50839efecf756b Mon Sep 17 00:00:00 2001 From: ray Date: Sun, 5 Sep 2021 17:52:28 +0100 Subject: [PATCH] add nvim-cmp --- init.plugins.vim | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/init.plugins.vim b/init.plugins.vim index 8531aa1..a881c26 100644 --- a/init.plugins.vim +++ b/init.plugins.vim @@ -50,6 +50,16 @@ let g:material_style = 'lighter' " setings after plug#end "}}} +" #nvim-cmp {{{ + " https://github.com/hrsh7th/nvim-cmp/ + " completion + Plug 'hrsh7th/nvim-cmp' + Plug 'hrsh7th/cmp-nvim-lsp' + Plug 'hrsh7th/cmp-buffer' + Plug 'hrsh7th/cmp-path' + " Plug 'hrsh7th/cmp-nvim-ultisnips' + + "}}} " keeping " #vim-hexokinase {{{ @@ -480,6 +490,35 @@ end EOF "}}} +" #cmp-nvim-ultisnips {{{ +lua <'] = cmp.mapping.complete(), + [''] = cmp.mapping.confirm({ select = true }), + [''] = cmp.mapping.abort(), + }, + sources = { + { name = 'buffer' }, + { name = 'nvim_lsp' }, + { name = 'path' }, + --{ name = 'ultisnips' }, + ... + } + }) +EOF + + "}}}