cmp supporting newline
This commit is contained in:
parent
1bbd7f5e6c
commit
9165e6dad8
1 changed files with 70 additions and 63 deletions
|
|
@ -75,10 +75,17 @@ cmp.setup({
|
||||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
['<C-Space>'] = cmp.mapping.complete {},
|
['<C-Space>'] = cmp.mapping.complete {},
|
||||||
['<CR>'] = cmp.mapping.confirm {
|
["<CR>"] = cmp.mapping({
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
i = function(fallback)
|
||||||
select = true,
|
if cmp.visible() and cmp.get_active_entry() then
|
||||||
},
|
cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false })
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
s = cmp.mapping.confirm({ select = true }),
|
||||||
|
c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }),
|
||||||
|
}),
|
||||||
['<Tab>'] = cmp.mapping(function(fallback)
|
['<Tab>'] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_next_item()
|
cmp.select_next_item()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue