dotfiles/private_dot_config/nvim/lua/plugins/nvim-cmp.lua
2024-05-25 01:40:59 +02:00

34 lines
756 B
Lua

return {
'hrsh7th/nvim-cmp' ,
version = false ,
event = 'InsertEnter',
dependencies = {
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-buffer' ,
'hrsh7th/cmp-path' ,
'hrsh7th/cmp-emoji' ,
} ,
opts = function()
return {
snippet = {
expand = function(args)
require('luasnip').lsp_expand(args.body)
end
},
window = {
completion = require('cmp').config.window.bordered(),
documentation = require('cmp').config.window.bordered(),
},
sources = require('cmp').config.sources({
{ name = 'nvim_lsp' },
{ name = 'path' },
{ name = 'emoji' },
{ name = 'luasnip' },
}, {
{ name = 'buffer' },
}),
mapping = {
}
}
end ,
}