Initial commit for public dots
This commit is contained in:
27
.config/nvim/lua/plugins/cmp.lua
Normal file
27
.config/nvim/lua/plugins/cmp.lua
Normal file
@ -0,0 +1,27 @@
|
||||
vim.opt.completeopt = { 'menuone', 'noselect' }
|
||||
|
||||
local cmp = require'cmp'
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
['<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 = {
|
||||
{ name = 'path' },
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'buffer' },
|
||||
{ name = 'vsnip' }
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user