I use lsp-zero.nvim and it requires nvim-cmp which is what I think is causing the problem.

How can I retain the native autocompletion i_CTRL-P and i_CTRL-N while also using cmp?


1 Answer 1


The zero-lsp.nvim comes with some default key bindings that overrides the standard Ctrl n, Ctrl p.

You can disable these key bindings following the instruction: disable keybindings

The default setup instruction propose to add the following code into init.lua:

local lsp = require('lsp-zero').preset({})

lsp.on_attach(function(client, bufnr)
  -- see :help lsp-zero-keybindings
  -- to learn the available actions
  lsp.default_keymaps({buffer = bufnr})


If you don't want to override the key bindings insert instead:

local lsp = require('lsp-zero').preset({})

  • This feels like a link-only answer. Could you elaborate and add the necessary instructions?
    – D. Ben Knoble
    Jul 25 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.