.config/nvim/lua/plugins/completion.lua

changeset 1064
fcfa295076a8
parent 1056
235dd39d6629
child 1070
72b613de1102
equal deleted inserted replaced
1063:2763a54b0410 1064:fcfa295076a8
32 ["<C-b>"] = cmp.mapping.scroll_docs(-4), 32 ["<C-b>"] = cmp.mapping.scroll_docs(-4),
33 ["<C-f>"] = cmp.mapping.scroll_docs(4), 33 ["<C-f>"] = cmp.mapping.scroll_docs(4),
34 ["<Tab>"] = cmp.mapping.select_next_item(), 34 ["<Tab>"] = cmp.mapping.select_next_item(),
35 ["<S-Tab>"] = cmp.mapping.select_prev_item(), 35 ["<S-Tab>"] = cmp.mapping.select_prev_item(),
36 ["<C-g>"] = cmp.mapping.abort(), 36 ["<C-g>"] = cmp.mapping.abort(),
37 ["<Right>"] = cmp.mapping.confirm({select = true}), 37 ["<Right>"] = cmp.mapping.confirm({ select = true }),
38 ["<Space>"] = function(fallback) 38 ["<Space>"] = function(fallback)
39 if cmp.visible() then 39 if cmp.visible() then
40 cmp.confirm({select = false}, function() 40 cmp.confirm({ select = false }, function()
41 vim.api.nvim_feedkeys(" ", "n", false) 41 vim.api.nvim_feedkeys(" ", "n", false)
42 end) 42 end)
43 end 43 end
44 fallback() 44 fallback()
45 end, 45 end,
56 }), 56 }),
57 } 57 }
58 end, 58 end,
59 }, 59 },
60 } 60 }
61

mercurial