fix: nvim_cmp config for copilot (wip)
This commit is contained in:
parent
c468aecea9
commit
d5d5ca6fa7
8
nvimrc
8
nvimrc
|
@ -367,23 +367,23 @@ lua <<EOF
|
|||
cmp.setup({
|
||||
completion = {
|
||||
completeopt = 'menu,menuone,noinsert',
|
||||
keyword_length = 3,
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-u>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.close(),
|
||||
['C-y'] = cmp.mapping.confirm({ select = true, behaviour = cmp.ConfirmBehavior.Replace }),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true, behaviour = cmp.ConfirmBehavior.Replace }),
|
||||
},
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'copilot', keyword_length = 0 },
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'nvim_lsp', keyword_length = 3 },
|
||||
{
|
||||
name = 'buffer',
|
||||
option = {
|
||||
|
|
Loading…
Reference in New Issue