Add more sources for nvim-cmp

pull/2/head
Ensar Sarajčić 2021-10-08 20:47:52 +02:00
parent fbfd4800f9
commit 9a81a29971
2 changed files with 7 additions and 2 deletions

View File

@ -80,6 +80,9 @@ return require('packer').startup {
use 'alexaandru/nvim-lspupdate' -- Easy install and update for many LSP servers
use 'hrsh7th/cmp-nvim-lsp' -- LSP source for cmp
use 'hrsh7th/cmp-buffer' -- Buffer source for nvim-cmp
use 'hrsh7th/cmp-path' -- Path source for nvim-cmp
use 'hrsh7th/cmp-nvim-lua' -- Nvim-Lua source for nvim-cmp
use 'quangnguyen30192/cmp-nvim-ultisnips' -- Ultisnips source for nvim-cmp
use 'hrsh7th/nvim-cmp' -- completion integration
use 'nvim-lua/lsp_extensions.nvim' -- LSP extensions (like closing labels for Dart)

View File

@ -9,8 +9,8 @@ local cmp = require'cmp'
cmp.setup {
snippet = {
expand = function(args)
vim.fn["UltiSnips#Anon"](args.body)
end,
vim.fn["UltiSnips#Anon"](args.body)
end,
},
mapping = {
['<C-d>'] = cmp.mapping.scroll_docs(-4),
@ -21,6 +21,8 @@ cmp.setup {
},
sources = {
{ name = 'nvim_lsp' },
{ name = 'nvim_lua' },
{ name = 'path' },
{ name = 'ultisnips' },
{ name = 'buffer' },
}