nvim-cmp: completion menu appears but cannot be selected #39

Closed
opened 2026-06-23 16:18:05 +01:00 by lyrathorpe · 0 comments
Owner

Symptom

When typing (e.g. file paths), the nvim-cmp completion menu appears, but there is no way to navigate it or accept a suggestion.

Cause

nvim-cmp ships no default keymaps. The cmp setup in lyrathorpe/home/editor.nix defined sources and snippet but no mapping, so the menu rendered while nothing was bound to move through it or confirm an entry.

Fix

Add a standard mapping set to plugins.cmp.settings:

  • <C-n> / <C-p> and <Tab> / <S-Tab> — select next/previous item
  • <C-Space> — open the menu
  • <C-e> — abort
  • <CR> — confirm with select = false (a bare Enter stays a newline unless an entry is explicitly highlighted)
## Symptom When typing (e.g. file paths), the nvim-cmp completion menu appears, but there is no way to navigate it or accept a suggestion. ## Cause nvim-cmp ships **no default keymaps**. The cmp setup in `lyrathorpe/home/editor.nix` defined `sources` and `snippet` but no `mapping`, so the menu rendered while nothing was bound to move through it or confirm an entry. ## Fix Add a standard mapping set to `plugins.cmp.settings`: - `<C-n>` / `<C-p>` and `<Tab>` / `<S-Tab>` — select next/previous item - `<C-Space>` — open the menu - `<C-e>` — abort - `<CR>` — confirm with `select = false` (a bare Enter stays a newline unless an entry is explicitly highlighted)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lyrathorpe/nixfiles#39