`<C-d>, <C-f>, <C-Space>` are not working

Configured following the wiki(actually in my dofiles), <Tab>, <S-Tab> and <CR>(enter) are working well, however, the others, <C-d>, <C-f>, <C-Space> are not.

I use iTerm2 with Bash and tmux.
I don’t think there are conflicts with them and the key maps in Neovim seem good.

" :imap
i  <C-F>       * <Lua 19: ~/.local/share/nvim/plugged/nvim-cmp/lua/cmp/utils/keymap.lua:112>
i  <C-D>       * <Lua 65: ~/.local/share/nvim/plugged/nvim-cmp/lua/cmp/utils/keymap.lua:112>

Any guessing reasons?

Are you sure they are not working? In order to test <C-d> and <C-f>, you need a documentation window that displays a lot of info (more than can be fit in the docs preview window). Only then can you see if these mappings scroll or not. For example:

With regards to <C-Space>, how are you testing it? If you go to insert mode, and hit <C-Space> does the completion menu pop up?

Edit: I noticed that you are using F and D for scrolling. I would rather use F(orward) and B(ack) or Up and Down to be consistent with vim’s default mappings. Here is how I have it mapped in my config file. Try this out and see if it works:

  mapping = cmp.mapping.preset.insert ({
    ["<C-CR>"] = cmp.mapping.confirm({ select = true }),
    ["<C-u>"] = cmp.mapping.scroll_docs(-4), -- scroll up
    ["<C-d>"] = cmp.mapping.scroll_docs(4), -- scroll down
    ["<C-Space>"] = cmp.mapping.complete(),
    ["<C-e>"] = cmp.mapping.close(),

1 Like

My bad careless didn’t notice that <C-d> and <C-f> are for the “documentation” section of the window. <C-d> and <C-f> are working well. Thank you. Btw, ‘f’ and ‘d’ are seem reasonable keys since they are close rather than ‘u’ and ‘d’, or ‘f’ and ‘b’.

<C-Space> is also working. <C-e>, closing the menu, makes to test easily.