dotfiles/private_dot_config/nvim/lua/plugins/nvim-cmp.lua
2024-04-15 07:42:08 +02:00

34 lines
796 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()
local cmp = require('cmp')
local defaults = require('cmp.config.default')()
return {
snippet = {
expand = function(args)
require('luasnip').lsp_expand(args.body)
end
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'path' },
{ name = 'emoji' },
{ name = 'luasnip' },
}, {
{ name = 'buffer' },
}),
}
end ,
}