nvim-lua / kickstart.nvim

A launch point for your personal nvim configuration
MIT License
18.9k stars 21.68k forks source link

nvim-cmp <C-h> mapping kills backspace in insertion mode #1002

Closed momyc closed 1 month ago

momyc commented 3 months ago

Describe the bug

While in insert mode pressing backspace key does not do anything as it seems to be re-mapped by nvim-cmp <C-h> mapping:

          ['<C-h>'] = cmp.mapping(function()
            if luasnip.locally_jumpable(-1) then
              luasnip.jump(-1)
            end
          end, { 'i', 's' }),

To Reproduce

  1. Enter insertion mode
  2. Try to press backspace key to delete character before current insertion point
  3. Observe no action
  4. Commenting out <C-h> mapping in nvim-cmp plugin config function fixes the problem

Desktop

Neovim Version

NVIM v0.9.5
Build type: Release
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/x86_64-pc-linux-gnu-gcc  -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdoubl
e-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=always
 -fstack-protector-strong -DUNIT_TESTING -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/usr/include/luajit-2.1 -I/usr/include -I/usr/include -I/var/tmp/port
age/app-editors/neovim-0.9.5/work/neovim-0.9.5_build/src/nvim/auto -I/var/tmp/portage/app-editors/neovim-0.9.5/work/neovim-0.9.5_build/include -I/var/tmp/porta
ge/app-editors/neovim-0.9.5/work/neovim-0.9.5_build/cmake.config -I/var/tmp/portage/app-editors/neovim-0.9.5/work/neovim-0.9.5/src -I/usr/include -I/usr/includ
e -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include

   system vimrc file: "/etc/vim/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"
iton0 commented 2 months ago

Try updating your neovim to 0.10 and see if the issue still happens

feoh commented 1 month ago

Can't repro. No response from OP in a month. Closing.