Skip to content

Commit

Permalink
Set up snippet engine required by nvim-cmp
Browse files Browse the repository at this point in the history
  • Loading branch information
Slotos committed Jan 11, 2022
1 parent ee265f2 commit cd37c85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pac.vim
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ call minpac#add('ray-x/cmp-treesitter')
call minpac#add('kdheepak/cmp-latex-symbols')
call minpac#add('hrsh7th/cmp-cmdline')
call minpac#add('hrsh7th/nvim-cmp')
call minpac#add('hrsh7th/vim-vsnip')
call minpac#add('hrsh7th/vim-vsnip-integ')

call minpac#add('onsails/lspkind-nvim')

Expand Down
4 changes: 4 additions & 0 deletions settings/nvim-cmp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ if vim.fn['pac#loaded']('nvim-cmp') then
},
}

if vim.fn['pac#loaded']('vim-vsnip') then
options.snippet = { expand = function(args) vim.fn["vsnip#anonymous"](args.body) end }
end

if vim.fn['pac#loaded']('cmp-treesitter') then
table.insert(options["sources"], { name = 'treesitter' })
end
Expand Down

0 comments on commit cd37c85

Please sign in to comment.