diff options
author | Squibid <me@zacharyscheiman.com> | 2024-12-22 15:19:59 -0500 |
---|---|---|
committer | Squibid <me@zacharyscheiman.com> | 2024-12-22 15:19:59 -0500 |
commit | 82bd91d9de7eccfdcc0fb25776e1ec6976fef695 (patch) | |
tree | bbdb0749d99f0e9899c7cf470a3a9f228b1bf17a | |
parent | b8d0882881d3b407cd626ec6f48051875b91049c (diff) | |
download | nvim-82bd91d9de7eccfdcc0fb25776e1ec6976fef695.tar.gz nvim-82bd91d9de7eccfdcc0fb25776e1ec6976fef695.tar.bz2 nvim-82bd91d9de7eccfdcc0fb25776e1ec6976fef695.zip |
simplify confirm keybind nvim cmp
-rw-r--r-- | lua/conf/plugins/cmp.lua | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lua/conf/plugins/cmp.lua b/lua/conf/plugins/cmp.lua index 9ce0878..ebca929 100644 --- a/lua/conf/plugins/cmp.lua +++ b/lua/conf/plugins/cmp.lua @@ -108,12 +108,7 @@ return { 'hrsh7th/nvim-cmp', -- mappings mapping = cmp.mapping.preset.insert { ["<C-y>"] = cmp.mapping(function() - if cmp.get_active_entry() then - cmp.confirm({ select = true }) - elseif cmp.visible() and not cmp.get_active_entry() then - cmp.select_next_item() - cmp.confirm({ select = true }) - end + cmp.confirm({ select = true }) end, { "i", "c" }), ["<C-n>"] = cmp.mapping(function() |