moved to cmp-nvim
This commit is contained in:
parent
1ab7245994
commit
79f4fe3aff
50
init.vim
50
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 = {
|
||||
['<C-n>'] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
['<C-p>'] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
--['<Down>'] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }),
|
||||
--['<Up>'] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }),
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.close(),
|
||||
['<CR>'] = 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 <YOUR_LSP_SERVER> with each lsp server you've enabled.
|
||||
-- require('lspconfig')['<YOUR_LSP_SERVER>'].setup {
|
||||
-- capabilities = capabilities
|
||||
-- }
|
||||
|
||||
EOF
|
||||
|
||||
|
||||
|
||||
"============================ A Nice Color Scheme ==============================
|
||||
|
|
Loading…
Reference in New Issue
Block a user