summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorkylo252 <[email protected]>2021-10-24 14:22:39 +0200
committerGitHub <[email protected]>2021-10-24 14:22:39 +0200
commit27ffaab737ae27a10a05eb11473f51ac35b21701 (patch)
tree9bb6acb668177d278c58fbc52b27d400a2004a1e /lua
parentefe30f26a7c5a927c24cec17d23bef3bea5114ee (diff)
feat: make cmp keyword_length easier to configure (#1840)
Diffstat (limited to 'lua')
-rw-r--r--lua/lvim/core/cmp.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/lua/lvim/core/cmp.lua b/lua/lvim/core/cmp.lua
index b1cb1431..f35ead9a 100644
--- a/lua/lvim/core/cmp.lua
+++ b/lua/lvim/core/cmp.lua
@@ -126,6 +126,12 @@ M.config = function()
behavior = cmp.ConfirmBehavior.Replace,
select = false,
},
+ completion = {
+ ---@usage vim's `completeopt` setting. Warning: Be careful when changing this value.
+ completeopt = "menu,menuone,noinsert",
+ ---@usage The minimum length of a word to complete on.
+ keyword_length = 1,
+ },
experimental = {
ghost_text = true,
native_menu = false,
@@ -241,7 +247,7 @@ M.config = function()
}),
["<C-Space>"] = cmp.mapping.complete(),
- ["<C-e>"] = cmp.mapping.close(),
+ ["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping(function(fallback)
if cmp.visible() and cmp.confirm(lvim.builtin.cmp.confirm_opts) then
return